Package org.openspaces.core.util.numbers
Class LongHelper
java.lang.Object
org.openspaces.core.util.numbers.LongHelper
- All Implemented Interfaces:
Comparator<Number>,NumberHelper<Long>
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the two numbers (can be of any Number type) and returns the type result that the number helper handles.Casts the giveNumberinto the type the number helper handles.intDivides the two numbers (can be of any Number type) and returns the type result that the number helper handles.Returns the maximum number for the specific type the number helper handles.Returns the minimum number for the specific type the number helper handles.Multiplies the two numbers (can be of any Number type) and returns the type result that the number helper handles.ONE()Returns the "ONE" value for the given type.Substracts the two numbers (can be of any Number type) and returns the type result that the number helper handles.ZERO()Returns the "ZERO" value for the given type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
LongHelper
public LongHelper()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Number>
-
add
Description copied from interface:NumberHelperAdds the two numbers (can be of any Number type) and returns the type result that the number helper handles.- Specified by:
addin interfaceNumberHelper<Long>
-
sub
Description copied from interface:NumberHelperSubstracts the two numbers (can be of any Number type) and returns the type result that the number helper handles.- Specified by:
subin interfaceNumberHelper<Long>
-
mult
Description copied from interface:NumberHelperMultiplies the two numbers (can be of any Number type) and returns the type result that the number helper handles.- Specified by:
multin interfaceNumberHelper<Long>
-
div
Description copied from interface:NumberHelperDivides the two numbers (can be of any Number type) and returns the type result that the number helper handles.- Specified by:
divin interfaceNumberHelper<Long>
-
MAX_VALUE
Description copied from interface:NumberHelperReturns the maximum number for the specific type the number helper handles.- Specified by:
MAX_VALUEin interfaceNumberHelper<Long>
-
MIN_VALUE
Description copied from interface:NumberHelperReturns the minimum number for the specific type the number helper handles.- Specified by:
MIN_VALUEin interfaceNumberHelper<Long>
-
ONE
Description copied from interface:NumberHelperReturns the "ONE" value for the given type.- Specified by:
ONEin interfaceNumberHelper<Long>
-
ZERO
Description copied from interface:NumberHelperReturns the "ZERO" value for the given type.- Specified by:
ZEROin interfaceNumberHelper<Long>
-
cast
Description copied from interface:NumberHelperCasts the giveNumberinto the type the number helper handles.- Specified by:
castin interfaceNumberHelper<Long>
-