public interface NumberHelper<N extends Number> extends Comparator<Number>
Number
implementation allowing
to use it in a generalized fashion.Modifier and Type | Method and Description |
---|---|
N |
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.
|
N |
cast(Number n)
Casts the give
Number into the type the number helper handles. |
N |
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.
|
N |
MAX_VALUE()
Returns the maximum number for the specific type the number helper handles.
|
N |
MIN_VALUE()
Returns the minimum number for the specific type the number helper handles.
|
N |
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.
|
N |
ONE()
Returns the "ONE" value for the given type.
|
N |
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.
|
N |
ZERO()
Returns the "ZERO" value for the given type.
|
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
N MAX_VALUE()
N MIN_VALUE()
N ONE()
N ZERO()
N add(Number lhs, Number rhs)
N sub(Number lhs, Number rhs)
N mult(Number lhs, Number rhs)
Copyright © GigaSpaces.