| net.sf.jga.fn.arithmetic.IntegerArithmetic
IntegerArithmetic | public interface IntegerArithmetic extends Arithmetic<T>(Code) | | Defines arithmetic operations appropriate for Integral Numbers.
An implementation of IntegerArithmetic for classes (such as
BigInteger) that provide the appropriate operations can simply map these
methods to the methods provided by the Number. For the reference types,
the implementation will need to dereference the arguments, perform the
specified operation on the resulting primitives, and box up the result in
a new reference type.
Implementations of IntegerArithmetic for user-defined Number classes must
be registered with the ArithmeticFactory class. See the Arithmetic class
for details.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
and | public T and(T x, T y)(Code) | | For numeric arguments x and y, returns x & y
x & y |
modulus | public T modulus(T x, T y)(Code) | | For numeric arguments x and y, returns x % y
the modulus of the two arguments |
not | public T not(T x)(Code) | | For numeric arguments x, returns ~x
the one's complement of the argument |
or | public T or(T x, T y)(Code) | | For numeric arguments x and y, returns x | y
x | y |
signedShiftRight | public T signedShiftRight(T x, Integer y)(Code) | | x >> y |
unsignedShiftRight | public T unsignedShiftRight(T x, Integer y)(Code) | | Optional.
x >>> y |
xor | public T xor(T x, T y)(Code) | | For numeric arguments x and y, returns x ^ y
x ^ y |
|
|