Class NumberMath<T extends Number>

java.lang.Object
org.checkerframework.common.value.util.NumberMath<T>
Direct Known Subclasses:
ByteMath, DoubleMath, FloatMath, IntegerMath, LongMath, ShortMath

public abstract class NumberMath<T extends Number> extends Object
  • Constructor Details

    • NumberMath

      public NumberMath()
  • Method Details

    • getNumberMath

      public static NumberMath<?> getNumberMath(Number number)
    • plus

      public abstract Number plus(Number right)
    • minus

      public abstract Number minus(Number right)
    • times

      public abstract Number times(Number right)
    • divide

      public abstract Number divide(Number right)
      Returns the result of dividing the this by right. If right is zero and this is an integer division, null is returned.
    • remainder

      public abstract Number remainder(Number right)
      Returns the result of this % right. If right is zero and this is an integer remainder, null is returned.
    • shiftLeft

      public abstract Number shiftLeft(Number right)
    • signedShiftRight

      public abstract Number signedShiftRight(Number right)
    • unsignedShiftRight

      public abstract Number unsignedShiftRight(Number right)
    • bitwiseAnd

      public abstract Number bitwiseAnd(Number right)
    • bitwiseOr

      public abstract Number bitwiseOr(Number right)
    • bitwiseXor

      public abstract Number bitwiseXor(Number right)
    • unaryPlus

      public abstract Number unaryPlus()
    • unaryMinus

      public abstract Number unaryMinus()
    • bitwiseComplement

      public abstract Number bitwiseComplement()
    • equalTo

      public abstract Boolean equalTo(Number right)
    • notEqualTo

      public abstract Boolean notEqualTo(Number right)
    • greaterThan

      public abstract Boolean greaterThan(Number right)
    • greaterThanEq

      public abstract Boolean greaterThanEq(Number right)
    • lessThan

      public abstract Boolean lessThan(Number right)
    • lessThanEq

      public abstract Boolean lessThanEq(Number right)
    • isIntegralZero

      public static boolean isIntegralZero(Number number)