Package xyz.cofe.num

Class BigDecimalNumbers

  • All Implemented Interfaces:
    Numbers<BigDecimal>

    public class BigDecimalNumbers
    extends Object
    implements Numbers<BigDecimal>
    Математические операции над BigDecimal
    Author:
    Kamnev Georgiy
    • Constructor Detail

      • BigDecimalNumbers

        public BigDecimalNumbers()
    • Method Detail

      • zero

        public BigDecimal zero()
        Description copied from interface: Numbers
        Возвращает нулевое число
        Specified by:
        zero in interface Numbers<BigDecimal>
        Returns:
        ноль
      • one

        public BigDecimal one()
        Description copied from interface: Numbers
        Возвращает единицу
        Specified by:
        one in interface Numbers<BigDecimal>
        Returns:
        единица
      • zero

        public boolean zero​(BigDecimal n)
        Description copied from interface: Numbers
        Проверяет что число является нулем
        Specified by:
        zero in interface Numbers<BigDecimal>
        Parameters:
        n - число
        Returns:
        true - число является нулем
      • undefined

        public boolean undefined​(BigDecimal n)
        Description copied from interface: Numbers
        Проверяет что число не определенно
        Specified by:
        undefined in interface Numbers<BigDecimal>
        Parameters:
        n - число
        Returns:
        true - число не определенно
      • infinity

        public boolean infinity​(BigDecimal n)
        Description copied from interface: Numbers
        Проверяет что число является бесконечностью
        Specified by:
        infinity in interface Numbers<BigDecimal>
        Parameters:
        n - число
        Returns:
        true - число является бесконечностью
      • equals

        public boolean equals​(BigDecimal a,
                              BigDecimal b)
        Description copied from interface: Numbers
        Сравнивает два числа на равность
        Specified by:
        equals in interface Numbers<BigDecimal>
        Parameters:
        a - число а
        b - число б
        Returns:
        true - числа равны
      • more

        public boolean more​(BigDecimal a,
                            BigDecimal b)
        Description copied from interface: Numbers
        Сравннвает числа
        Specified by:
        more in interface Numbers<BigDecimal>
        Parameters:
        a - число а
        b - число б
        Returns:
        true - число а больше б
      • less

        public boolean less​(BigDecimal a,
                            BigDecimal b)
        Description copied from interface: Numbers
        Сравннвает числа
        Specified by:
        less in interface Numbers<BigDecimal>
        Parameters:
        a - число а
        b - число б
        Returns:
        true - число а меньше б
      • next

        public BigDecimal next​(BigDecimal n)
        Description copied from interface: Numbers
        Возвращает следующее число
        Specified by:
        next in interface Numbers<BigDecimal>
        Parameters:
        n - число
        Returns:
        следующее число
      • prev

        public BigDecimal prev​(BigDecimal n)
        Description copied from interface: Numbers
        Возвращает предыдущее число
        Specified by:
        prev in interface Numbers<BigDecimal>
        Parameters:
        n - число
        Returns:
        предыдущее число