public class Validator
extends java.lang.Object
Constructor and Description |
---|
Validator() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(boolean boolean1,
boolean boolean2)
Returns
true if the booleans are equal. |
static boolean |
equals(byte byte1,
byte byte2)
Returns
true if the bytes are equal. |
static boolean |
equals(char char1,
char char2)
Returns
true if the characters are equal. |
static boolean |
equals(double double1,
double double2)
Returns
true if the doubles are equal. |
static boolean |
equals(float float1,
float float2)
Returns
true if the floats are equal. |
static boolean |
equals(int int1,
int int2)
Returns
true if the integers are equal. |
static boolean |
equals(long long1,
long long2)
Returns
true if the long integers are equal. |
static boolean |
equals(java.lang.Object obj1,
java.lang.Object obj2)
Returns
true if the objects are either equal, the same
instance, or both null . |
static boolean |
equals(short short1,
short short2)
Returns
true if the short integers are equal. |
static boolean |
isBlank(java.lang.String s) |
static boolean |
isChar(char c)
Returns
true if the character is an upper or lower case
English letter. |
static boolean |
isDigit(char c)
Returns
true if the character is a digit between 0 and 9
(inclusive). |
static boolean |
isDigit(java.lang.String s)
Returns
true if the string consists of only digits between 0
and 9 (inclusive). |
static boolean |
isNotNull(java.lang.Object obj)
Returns
true if the object is not null , using
the rules from #isNotNull(Long) or isNotNull(String) if
the object is one of these types. |
static boolean |
isNotNull(java.lang.String s)
Returns
true if the string is not null , meaning
it is not a null reference, nothing but spaces, or the
string "null ", with zero or more leading or trailing spaces. |
static boolean |
isNull(java.lang.Object obj)
Returns
true if the object is null , using the
rules from #isNull(Long) or isNull(String) if the object
is one of these types. |
static boolean |
isNull(java.lang.String s)
Returns
true if the string is null , meaning it
is a null reference, nothing but spaces, or the string
"null ", with zero or more leading or trailing spaces. |
public static boolean equals(boolean boolean1, boolean boolean2)
true
if the booleans are equal.boolean1
- the first booleanboolean2
- the second booleantrue
if the booleans are equal; false
otherwisepublic static boolean equals(byte byte1, byte byte2)
true
if the bytes are equal.byte1
- the first bytebyte2
- the second bytetrue
if the bytes are equal; false
otherwisepublic static boolean equals(char char1, char char2)
true
if the characters are equal.char1
- the first characterchar2
- the second charactertrue
if the characters are equal; false
otherwisepublic static boolean equals(double double1, double double2)
true
if the doubles are equal.double1
- the first doubledouble2
- the second doubletrue
if the doubles are equal; false
otherwisepublic static boolean equals(float float1, float float2)
true
if the floats are equal.float1
- the first floatfloat2
- the second floattrue
if the floats are equal; false
otherwisepublic static boolean equals(int int1, int int2)
true
if the integers are equal.int1
- the first integerint2
- the second integertrue
if the integers are equal; false
otherwisepublic static boolean equals(long long1, long long2)
true
if the long integers are equal.long1
- the first long integerlong2
- the second long integertrue
if the long integers are equal;
false
otherwisepublic static boolean equals(java.lang.Object obj1, java.lang.Object obj2)
true
if the objects are either equal, the same
instance, or both null
.obj1
- the first objectobj2
- the second objecttrue
if the objects are either equal, the same
instance, or both null
; false
otherwisepublic static boolean equals(short short1, short short2)
true
if the short integers are equal.short1
- the first short integershort2
- the second short integertrue
if the short integers are equal;
false
otherwisepublic static boolean isBlank(java.lang.String s)
public static boolean isChar(char c)
true
if the character is an upper or lower case
English letter.c
- the character to checktrue
if the character is an upper or lower case
English letter; false
otherwisepublic static boolean isDigit(char c)
true
if the character is a digit between 0 and 9
(inclusive).c
- the character to checktrue
if the character is a digit between 0 and 9
(inclusive); false
otherwisepublic static boolean isDigit(java.lang.String s)
true
if the string consists of only digits between 0
and 9 (inclusive).s
- the string to checktrue
if the string consists of only digits between 0
and 9 (inclusive); false
otherwisepublic static boolean isNotNull(java.lang.Object obj)
true
if the object is not null
, using
the rules from #isNotNull(Long)
or isNotNull(String)
if
the object is one of these types.obj
- the object to checktrue
if the object is not null
;
false
otherwisepublic static boolean isNotNull(java.lang.String s)
true
if the string is not null
, meaning
it is not a null
reference, nothing but spaces, or the
string "null
", with zero or more leading or trailing spaces.s
- the string to checktrue
if the string is not null
;
false
otherwisepublic static boolean isNull(java.lang.Object obj)
true
if the object is null
, using the
rules from #isNull(Long)
or isNull(String)
if the object
is one of these types.obj
- the object to checktrue
if the object is null
;
false
otherwisepublic static boolean isNull(java.lang.String s)
true
if the string is null
, meaning it
is a null
reference, nothing but spaces, or the string
"null
", with zero or more leading or trailing spaces.s
- the string to checktrue
if the string is null
;
false
otherwise