Package xyz.cofe.num

Class AtomicLongNumbers

java.lang.Object
xyz.cofe.num.AtomicLongNumbers
All Implemented Interfaces:
Numbers<java.util.concurrent.atomic.AtomicLong>

public class AtomicLongNumbers
extends java.lang.Object
implements Numbers<java.util.concurrent.atomic.AtomicLong>
Математические операции над AtomicLong
Author:
Kamnev Georgiy
  • Constructor Summary

    Constructors 
    Constructor Description
    AtomicLongNumbers()  
  • Method Summary

    Modifier and Type Method Description
    java.util.concurrent.atomic.AtomicLong add​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Сложение чисел
    java.util.concurrent.atomic.AtomicLong div​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Деление чисел
    boolean equals​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Сравнивает два числа на равность
    boolean infinity​(java.util.concurrent.atomic.AtomicLong n)
    Проверяет что число является бесконечностью
    boolean less​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Сравннвает числа
    boolean more​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Сравннвает числа
    java.util.concurrent.atomic.AtomicLong mul​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Умножение чисел
    java.util.concurrent.atomic.AtomicLong next​(java.util.concurrent.atomic.AtomicLong n)
    Возвращает следующее число
    java.util.concurrent.atomic.AtomicLong one()
    Возвращает единицу
    java.util.concurrent.atomic.AtomicLong prev​(java.util.concurrent.atomic.AtomicLong n)
    Возвращает предыдущее число
    java.util.concurrent.atomic.AtomicLong remainder​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Остаток от деления
    java.util.concurrent.atomic.AtomicLong sub​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
    Вычитание чисел
    boolean undefined​(java.util.concurrent.atomic.AtomicLong n)
    Проверяет что число не определенно
    java.util.concurrent.atomic.AtomicLong zero()
    Возвращает нулевое число
    boolean zero​(java.util.concurrent.atomic.AtomicLong n)
    Проверяет что число является нулем

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • zero

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

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

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

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

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

      public java.util.concurrent.atomic.AtomicLong add​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
      Description copied from interface: Numbers
      Сложение чисел
      Specified by:
      add in interface Numbers<java.util.concurrent.atomic.AtomicLong>
      Parameters:
      a - число а
      b - число б
      Returns:
      сумма чисел
    • sub

      public java.util.concurrent.atomic.AtomicLong sub​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
      Description copied from interface: Numbers
      Вычитание чисел
      Specified by:
      sub in interface Numbers<java.util.concurrent.atomic.AtomicLong>
      Parameters:
      a - число а
      b - число б
      Returns:
      разность чисел
    • mul

      public java.util.concurrent.atomic.AtomicLong mul​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
      Description copied from interface: Numbers
      Умножение чисел
      Specified by:
      mul in interface Numbers<java.util.concurrent.atomic.AtomicLong>
      Parameters:
      a - число а
      b - число б
      Returns:
      результат умножение
    • div

      public java.util.concurrent.atomic.AtomicLong div​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
      Description copied from interface: Numbers
      Деление чисел
      Specified by:
      div in interface Numbers<java.util.concurrent.atomic.AtomicLong>
      Parameters:
      a - число а
      b - число б
      Returns:
      результат деления
    • remainder

      public java.util.concurrent.atomic.AtomicLong remainder​(java.util.concurrent.atomic.AtomicLong a, java.util.concurrent.atomic.AtomicLong b)
      Description copied from interface: Numbers
      Остаток от деления
      Specified by:
      remainder in interface Numbers<java.util.concurrent.atomic.AtomicLong>
      Parameters:
      a - число а
      b - число б
      Returns:
      остаток
    • equals

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

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

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

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

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