public interface AQLongFactory
Long
data type.
An instance of this interface is available via aqua.type.long. (For technical reasons, aqua.type.long is not available).
Modifier and Type | Method and Description |
---|---|
boolean |
isEqual(Object a,
Object b)
Checks if two values are equal, if treated as long integers.
|
boolean |
isGreater(Object a,
Object b)
Checks if the value is greater than a specified threshold.
|
boolean |
isGreaterOrEqual(Object a,
Object b)
Checks if the value is less than or equals to a specified threshold.
|
boolean |
isInRange(Object value,
Object min,
Object max)
Checks if the value is within a specified range, inclusive.
|
boolean |
isLess(Object a,
Object b)
Checks if the value is less than a specified threshold.
|
boolean |
isLessOrEqual(Object a,
Object b)
Checks if the value is less than or equals to a specified threshold.
|
boolean |
isValid(String value)
Interprets a specified value as a Long (using default platform locale).
|
Long |
parse(Object value)
Creates a Long instance assuming default platform locale.
|
Long |
parse(String value,
String pattern)
Creates a Long instance using a specified pattern and locale.
|
Long |
parse(String value,
String pattern,
String locale)
Interprets a specified value as a Long using a specified pattern and locale.
|
Long parse(Object value)
If conversion is successful, the method returns the resulting Long object, otherwise it throws an exception.
value
- The value to be converted.Long parse(String value, String pattern)
If conversion is successful, the method returns the resulting Long object, otherwise it throws an exception.
value
- The value to be converted.pattern
- The pattern used to validate the value against or null to
use the default for the Locale. Please see DecimalFormatSymbols
Long parse(String value, String pattern, String locale)
If conversion is successful, the method returns the resulting Long object, otherwise it throws an exception.
value
- The value to be converted.pattern
- The pattern used to validate the value against or null to
use the default for the Locale. Please see DecimalFormatSymbols
locale
- The locale to use for the format, system default if null. Please see Locale
.boolean isInRange(Object value, Object min, Object max)
value
- The value in question.min
- Start of the range.max
- End of the range.
* @throws Exception
If any of the parameters cannot be converted to a long.boolean isLess(Object a, Object b)
a
- The integer value to compare to.b
- The integer value to compare with.boolean isLessOrEqual(Object a, Object b)
a
- The integer value to compare to.b
- The integer value to compare with.boolean isGreater(Object a, Object b)
a
- The long value to compare to.b
- The long value to compare with.boolean isGreaterOrEqual(Object a, Object b)
a
- The long value to compare to.b
- The long value to compare with.boolean isEqual(Object a, Object b)
a
- The first long value.b
- The second long value.boolean isValid(String value)
If conversion is successful, the method returns resulting Long object, otherwise it returns null.
value
- the specified value
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.