@InterfaceAudience.Public @InterfaceStability.Evolving public class IntegerUtils extends Object
Operations on Integer that are
null safe.
| Constructor and Description |
|---|
IntegerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areBothEqual(Integer first,
Integer second)
Checks if the given values are EQUAL i.e first
== second. |
static boolean |
isFirstGraterThanSecond(Integer first,
Integer second)
Checks if the given first integer is greater than the second integer value
i.e first > second.
|
static boolean |
isFirstLessThanSecond(Integer first,
Integer second)
Checks if the given first integer is less than the second integer value
i.e first < second.
|
static boolean |
isNegative(Integer integer)
Checks if the given integer is holding a Negative value i.e less than
zero.
|
static boolean |
isPositive(Integer integer)
Checks if the given integer is holding a positive value i.e grater than
zero.
|
static boolean |
isZero(Integer integer)
Checks if the given integer is holding a ZERO i.e 0.
|
public static boolean isPositive(Integer integer)
integer - the integerpublic static boolean isNegative(Integer integer)
integer - the integerpublic static boolean isZero(Integer integer)
integer - the integerpublic static boolean isFirstLessThanSecond(Integer first, Integer second)
first - the firstsecond - the secondpublic static boolean isFirstGraterThanSecond(Integer first, Integer second)
first - the firstsecond - the secondCopyright © 2016 utils4j. All Rights Reserved.