Package pro.gravit.utils.helper
Class VerifyHelper
java.lang.Object
pro.gravit.utils.helper.VerifyHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic LongPredicatestatic LongPredicatestatic IntPredicatestatic IntPredicatestatic Pattern -
Method Summary
Modifier and TypeMethodDescriptionstatic <K, V> VgetMapValue(Map<K,V> map, K key, String error)static booleanisValidIDName(String name)static booleanisValidIDNameChar(int ch)static booleanisValidServerID(CharSequence serverID)static booleanisValidUsername(CharSequence username)static <K, V> voidputIfAbsent(Map<K,V> map, K key, V value, String error)static IntPredicaterange(int min, int max)static <T> Tstatic doubleverifyDouble(double d, DoublePredicate predicate, String error)static StringverifyIDName(String name)static intverifyInt(int i, IntPredicate predicate, String error)static longverifyLong(long l, LongPredicate predicate, String error)static StringverifyServerID(String serverID)static StringverifyUsername(String username)
-
Field Details
-
POSITIVE
-
NOT_NEGATIVE
-
L_POSITIVE
-
L_NOT_NEGATIVE
-
NOT_EMPTY
-
USERNAME_PATTERN
-
-
Method Details
-
getMapValue
-
isValidIDName
-
isValidIDNameChar
public static boolean isValidIDNameChar(int ch) -
isValidServerID
-
isValidUsername
-
putIfAbsent
-
range
-
verify
-
verifyDouble
-
verifyIDName
-
verifyInt
-
verifyLong
-
verifyServerID
-
verifyUsername
-