Package com.clickhouse.data
Class ClickHouseChecker
java.lang.Object
com.clickhouse.data.ClickHouseChecker
Deprecated.
Utility class for validation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intDeprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static intbetween(int value, int minValue, int maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static intDeprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static longbetween(long value, long minValue, long maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static longDeprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static BigDecimalbetween(BigDecimal value, String name, BigDecimal minValue, BigDecimal maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValue*exclusive* and throws a customizedIllegalArgumentExceptionif it is NOT.static BigDecimalbetween(BigDecimal value, BigDecimal minValue, BigDecimal maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValue*exclusive* and throws a customizedIllegalArgumentExceptionif it is NOT.static BigIntegerbetween(BigInteger value, String name, BigInteger minValue, BigInteger maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static BigIntegerbetween(BigInteger value, BigInteger minValue, BigInteger maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.static booleanisNullOrBlank(CharSequence value) Deprecated.Checks if the given string is null, empty string or a string only contains white spaces.static booleanisNullOrEmpty(CharSequence value) Deprecated.Checks if the given string isnullor empty.static StringDeprecated.Checks if the given string is notnull, empty or blank and throws a customizedIllegalArgumentExceptionif it is.static StringDeprecated.Checks if the given string is neithernullnor empty and throws a customizedIllegalArgumentExceptionif it is.static final <T> TDeprecated.Checks if the given object is NOTnulland throws a customizedIllegalArgumentExceptionif it is.static intnotLessThan(int value, String name, int minValue) Deprecated.Checks if the givenvalueis NOT less thanminValueand throws a customizedIllegalArgumentExceptionif it is.static longnotLessThan(long value, String name, long minValue) Deprecated.Checks if the givenvalueis NOT less thanminValueand throws a customizedIllegalArgumentExceptionif it is.static BigIntegernotLessThan(BigInteger value, String name, BigInteger minValue) Deprecated.Checks if the givenvalueis NOT less thanminValueand throws a customizedIllegalArgumentExceptionif it is.static byte[]notLongerThan(byte[] value, String name, int maxLength) Deprecated.Checks if length of the given byte array is NOT greater thanlengthand throws a customizedIllegalArgumentExceptionif it is.
-
Method Details
-
between
public static int between(int value, int minValue, int maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
public static long between(long value, long minValue, long maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
public static BigInteger between(BigInteger value, String name, BigInteger minValue, BigInteger maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValueinclusive and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
Deprecated.Checks if the givenvalueis betweenminValueandmaxValue*exclusive* and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
between
public static BigDecimal between(BigDecimal value, String name, BigDecimal minValue, BigDecimal maxValue) Deprecated.Checks if the givenvalueis betweenminValueandmaxValue*exclusive* and throws a customizedIllegalArgumentExceptionif it is NOT.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare withmaxValue- maximum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis NOT betweenminValueandmaxValue
-
isNullOrEmpty
Deprecated.Checks if the given string isnullor empty.- Parameters:
value- the string to check- Returns:
- true if the string is null or empty; false otherwise
-
isNullOrBlank
Deprecated.Checks if the given string is null, empty string or a string only contains white spaces.- Parameters:
value- the string to check- Returns:
- true if the string is null, empty or blankļ¼ false otherwise
-
nonBlank
Deprecated.Checks if the given string is notnull, empty or blank and throws a customizedIllegalArgumentExceptionif it is.- Parameters:
value- the string to checkname- name of the string- Returns:
- the exact same string
- Throws:
IllegalArgumentException- if the string is null, empty or blank
-
nonEmpty
Deprecated.Checks if the given string is neithernullnor empty and throws a customizedIllegalArgumentExceptionif it is.- Parameters:
value- the string to checkname- name of the string- Returns:
- the exact same string
- Throws:
IllegalArgumentException- if the string is null or empty
-
nonNull
Deprecated.Checks if the given object is NOTnulland throws a customizedIllegalArgumentExceptionif it is.- Type Parameters:
T- type of the object- Parameters:
value- the objectname- name of the object- Returns:
- the exact same object
- Throws:
IllegalArgumentException- if the object is null
-
notLessThan
Deprecated.Checks if the givenvalueis NOT less thanminValueand throws a customizedIllegalArgumentExceptionif it is.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis less thanminValue
-
notLessThan
Deprecated.Checks if the givenvalueis NOT less thanminValueand throws a customizedIllegalArgumentExceptionif it is.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis less thanminValue
-
notLessThan
Deprecated.Checks if the givenvalueis NOT less thanminValueand throws a customizedIllegalArgumentExceptionif it is.- Parameters:
value- the value to checkname- name of the valueminValue- minimum value to compare with- Returns:
- the exact same value
- Throws:
IllegalArgumentException- if thevalueis less thanminValue
-
notLongerThan
Deprecated.Checks if length of the given byte array is NOT greater thanlengthand throws a customizedIllegalArgumentExceptionif it is.- Parameters:
value- the byte array to checkname- name of the byte arraymaxLength- maximum length of the byte array- Returns:
- the exact same byte array
- Throws:
IllegalArgumentException- if length of the byte array is greater thanmaxlength
-