public class IntegerHelper extends Object implements NumberHelper<Integer>
Constructor and Description |
---|
IntegerHelper() |
Modifier and Type | Method and Description |
---|---|
Integer |
add(Number lhs,
Number rhs)
Adds the two numbers (can be of any Number type) and returns the type result
that the number helper handles.
|
Integer |
cast(Number n)
Casts the give
Number into the type the number helper handles. |
int |
compare(Number lhs,
Number rhs) |
Integer |
div(Number lhs,
Number rhs)
Divides the two numbers (can be of any Number type) and returns the type result
that the number helper handles.
|
Integer |
MAX_VALUE()
Returns the maximum number for the specific type the number helper handles.
|
Integer |
MIN_VALUE()
Returns the minimum number for the specific type the number helper handles.
|
Integer |
mult(Number lhs,
Number rhs)
Multiplies the two numbers (can be of any Number type) and returns the type result
that the number helper handles.
|
Integer |
ONE()
Returns the "ONE" value for the given type.
|
Integer |
sub(Number lhs,
Number rhs)
Substracts the two numbers (can be of any Number type) and returns the type result
that the number helper handles.
|
Integer |
ZERO()
Returns the "ZERO" value for the given type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(Number lhs, Number rhs)
compare
in interface Comparator<Number>
public Integer add(Number lhs, Number rhs)
NumberHelper
add
in interface NumberHelper<Integer>
public Integer sub(Number lhs, Number rhs)
NumberHelper
sub
in interface NumberHelper<Integer>
public Integer mult(Number lhs, Number rhs)
NumberHelper
mult
in interface NumberHelper<Integer>
public Integer div(Number lhs, Number rhs)
NumberHelper
div
in interface NumberHelper<Integer>
public Integer MAX_VALUE()
NumberHelper
MAX_VALUE
in interface NumberHelper<Integer>
public Integer MIN_VALUE()
NumberHelper
MIN_VALUE
in interface NumberHelper<Integer>
public Integer ONE()
NumberHelper
ONE
in interface NumberHelper<Integer>
public Integer ZERO()
NumberHelper
ZERO
in interface NumberHelper<Integer>
public Integer cast(Number n)
NumberHelper
Number
into the type the number helper handles.cast
in interface NumberHelper<Integer>
Copyright © GigaSpaces.