Class Precision

    • Method Detail

      • valueOf

        public static Precision valueOf​(int digits)
      • of

        public static final Precision of​(float x)
      • of

        public static final Precision of​(double x)
      • of

        public static Precision of​(BigDecimal x)
        The precision of a BigDecimal, with 0 for zero values.
        Parameters:
        x - the given BigDecimal
        Returns:
        the precision of x
      • multiply

        public Precision multiply​(int multiplier)
      • applyTo

        public BigDecimal applyTo​(BigDecimal x)
        Reduces the relative precision of x to this, or leaves it as it is if x already has a smaller precision.
        Parameters:
        x -
        Returns:
        x with maximum relative precision given by this.
      • digits

        public int digits()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object