Package com.helger.commons
Class ValueEnforcer
java.lang.Object
com.helger.commons.ValueEnforcer
This class contains "runtime assertions" utility methods. It works like
Objects.requireNonNull(Object) but offers many more
possibilities.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidisArrayOfsLen(boolean[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(byte[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(char[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(double[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(float[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(int[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(long[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(short[] aArray, int nOfs, int nLen) static voidisArrayOfsLen(Object[] aArray, int nOfs, int nLen) static doubleisBetweenExclusive(double dValue, String sName, double dLowerBoundExclusive, double dUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic doubleisBetweenExclusive(double dValue, Supplier<? extends String> aName, double dLowerBoundExclusive, double dUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic floatisBetweenExclusive(float fValue, String sName, float fLowerBoundExclusive, float fUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic floatisBetweenExclusive(float fValue, Supplier<? extends String> aName, float fLowerBoundExclusive, float fUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic intisBetweenExclusive(int nValue, String sName, int nLowerBoundExclusive, int nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic intisBetweenExclusive(int nValue, Supplier<? extends String> aName, int nLowerBoundExclusive, int nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic longisBetweenExclusive(long nValue, String sName, long nLowerBoundExclusive, long nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic longisBetweenExclusive(long nValue, Supplier<? extends String> aName, long nLowerBoundExclusive, long nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic shortisBetweenExclusive(short nValue, String sName, short nLowerBoundExclusive, short nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic shortisBetweenExclusive(short nValue, Supplier<? extends String> aName, short nLowerBoundExclusive, short nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigDecimalisBetweenExclusive(BigDecimal aValue, String sName, BigDecimal aLowerBoundExclusive, BigDecimal aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigDecimalisBetweenExclusive(BigDecimal aValue, Supplier<? extends String> aName, BigDecimal aLowerBoundExclusive, BigDecimal aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigIntegerisBetweenExclusive(BigInteger aValue, String sName, BigInteger aLowerBoundExclusive, BigInteger aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigIntegerisBetweenExclusive(BigInteger aValue, Supplier<? extends String> aName, BigInteger aLowerBoundExclusive, BigInteger aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic doubleisBetweenInclusive(double dValue, String sName, double dLowerBoundInclusive, double dUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic doubleisBetweenInclusive(double dValue, Supplier<? extends String> aName, double dLowerBoundInclusive, double dUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic floatisBetweenInclusive(float fValue, String sName, float fLowerBoundInclusive, float fUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic floatisBetweenInclusive(float fValue, Supplier<? extends String> aName, float fLowerBoundInclusive, float fUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic intisBetweenInclusive(int nValue, String sName, int nLowerBoundInclusive, int nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic intisBetweenInclusive(int nValue, Supplier<? extends String> aName, int nLowerBoundInclusive, int nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic longisBetweenInclusive(long nValue, String sName, long nLowerBoundInclusive, long nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic longisBetweenInclusive(long nValue, Supplier<? extends String> aName, long nLowerBoundInclusive, long nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic shortisBetweenInclusive(short nValue, String sName, short nLowerBoundInclusive, short nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic shortisBetweenInclusive(short nValue, Supplier<? extends String> aName, short nLowerBoundInclusive, short nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigDecimalisBetweenInclusive(BigDecimal aValue, String sName, BigDecimal aLowerBoundInclusive, BigDecimal aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigDecimalisBetweenInclusive(BigDecimal aValue, Supplier<? extends String> aName, BigDecimal aLowerBoundInclusive, BigDecimal aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigIntegerisBetweenInclusive(BigInteger aValue, String sName, BigInteger aLowerBoundInclusive, BigInteger aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigIntegerisBetweenInclusive(BigInteger aValue, Supplier<? extends String> aName, BigInteger aLowerBoundInclusive, BigInteger aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic booleanstatic voidCheck that the passed value is the same as the provided expected value using==to check comparison.static voidCheck that the passed value is the same as the provided expected value using==to check comparison.static voidCheck that the passed value is the same as the provided expected value using==to check comparison.static voidCheck that the passed value is the same as the provided expected value using==to check comparison.static voidCheck that the passed value is the same as the provided expected value using==to check comparison.static voidCheck that the passed value is the same as the provided expected value using==to check comparison.static <T> TCheck that the passed value is the same as the provided expected value usingequalsto check comparison.static <T> TCheck that the passed value is the same as the provided expected value usingequalsto check comparison.static voidCheck that the passed value isfalse.static voidCheck that the passed value isfalse.static voidisFalse(BooleanSupplier aValue, String sMsg) Check that the passed value isfalse.static voidisFalse(BooleanSupplier aValue, Supplier<? extends String> aMsg) Check that the passed value isfalse.static doublestatic doublestatic floatstatic floatstatic intstatic intstatic longstatic longstatic shortstatic shortstatic BigDecimalisGE0(BigDecimal aValue, String sName) static BigDecimalisGE0(BigDecimal aValue, Supplier<? extends String> aName) static BigIntegerisGE0(BigInteger aValue, String sName) static BigIntegerisGE0(BigInteger aValue, Supplier<? extends String> aName) static doublestatic doublestatic floatstatic floatstatic intstatic intstatic longstatic longstatic shortstatic shortstatic BigDecimalisGT0(BigDecimal aValue, String sName) static BigDecimalisGT0(BigDecimal aValue, Supplier<? extends String> aName) static BigIntegerisGT0(BigInteger aValue, String sName) static BigIntegerisGT0(BigInteger aValue, Supplier<? extends String> aName) static <T> voidisInstanceOf(T aValue, Class<? extends T> aClass, String sMsg) Check that the passed value is an instance of the passed class.static <T> voidisInstanceOf(T aValue, Class<? extends T> aClass, Supplier<? extends String> aMsg) Check that the passed value is an instance of the passed class.static doublestatic doublestatic floatstatic floatstatic intstatic intstatic longstatic longstatic shortstatic shortstatic BigDecimalisLE0(BigDecimal aValue, String sName) static BigDecimalisLE0(BigDecimal aValue, Supplier<? extends String> aName) static BigIntegerisLE0(BigInteger aValue, String sName) static BigIntegerisLE0(BigInteger aValue, Supplier<? extends String> aName) static doublestatic doublestatic floatstatic floatstatic intstatic intstatic longstatic longstatic shortstatic shortstatic BigDecimalisLT0(BigDecimal aValue, String sName) static BigDecimalisLT0(BigDecimal aValue, Supplier<? extends String> aName) static BigIntegerisLT0(BigInteger aValue, String sName) static BigIntegerisLT0(BigInteger aValue, Supplier<? extends String> aName) static doublestatic doublestatic intstatic intstatic longstatic longstatic BigDecimalisNE0(BigDecimal aValue, String sName) static BigDecimalisNE0(BigDecimal aValue, Supplier<? extends String> aName) static BigIntegerisNE0(BigInteger aValue, String sName) static BigIntegerisNE0(BigInteger aValue, Supplier<? extends String> aName) static voidCheck that the passed value isnull.static voidCheck that the passed value isnull.static <T> TCheck that the passed value is the same as the provided expected value using==to check comparison.static <T> TCheck that the passed value is the same as the provided expected value using==to check comparison.static voidCheck that the passed value istrue.static voidCheck that the passed value istrue.static voidisTrue(BooleanSupplier aValue, String sMsg) Check that the passed value istrue.static voidisTrue(BooleanSupplier aValue, Supplier<? extends String> aMsg) Check that the passed value istrue.static <T> T[]noNullValue(T[] aValue, String sName) Check that the passed Array contains nonullvalue.static <T> T[]noNullValue(T[] aValue, Supplier<? extends String> aName) Check that the passed Array contains nonullvalue.static <T extends Iterable<?>>
TnoNullValue(T aValue, String sName) Check that the passed iterable contains nonullvalue.static <T extends Iterable<?>>
TnoNullValue(T aValue, Supplier<? extends String> aName) Check that the passed iterable contains nonullvalue.static boolean[]Check that the passed Array is neithernullnor empty.static boolean[]Check that the passed Array is neithernullnor empty.static byte[]Check that the passed Array is neithernullnor empty.static byte[]Check that the passed Array is neithernullnor empty.static char[]Check that the passed Array is neithernullnor empty.static char[]Check that the passed Array is neithernullnor empty.static double[]Check that the passed Array is neithernullnor empty.static double[]Check that the passed Array is neithernullnor empty.static float[]Check that the passed Array is neithernullnor empty.static float[]Check that the passed Array is neithernullnor empty.static int[]Check that the passed Array is neithernullnor empty.static int[]Check that the passed Array is neithernullnor empty.static long[]Check that the passed Array is neithernullnor empty.static long[]Check that the passed Array is neithernullnor empty.static short[]Check that the passed Array is neithernullnor empty.static short[]Check that the passed Array is neithernullnor empty.static <T> T[]Check that the passed Array is neithernullnor empty.static <T> T[]Check that the passed Array is neithernullnor empty.static <T extends CharSequence>
TCheck that the passed String is neithernullnor empty.static <T extends CharSequence>
TCheck that the passed String is neithernullnor empty.static <T> T[]notEmptyNoNullValue(T[] aValue, String sName) Check that the passed Array is neithernullnor empty and that nonullvalue is contained.static <T> T[]notEmptyNoNullValue(T[] aValue, Supplier<? extends String> aName) Check that the passed Array is neithernullnor empty and that nonullvalue is contained.static <T extends Iterable<?>>
TnotEmptyNoNullValue(T aValue, String sName) Check that the passed collection is neithernullnor empty and that nonullvalue is contained.static <T extends Iterable<?>>
TnotEmptyNoNullValue(T aValue, Supplier<? extends String> aName) Check that the passed collection is neithernullnor empty and that nonullvalue is contained.static <T> TCheck that the passed value is notnull.static <T> TCheck that the passed value is notnull.static <T> TnotNullAndEquals(T aValue, String sName, T aExpectedValue) Check that the passed value is notnulland equal to the provided expected value.static <T> TnotNullAndEquals(T aValue, Supplier<? extends String> aName, T aExpectedValue) Check that the passed value is notnulland equal to the provided expected value.static <T> T[]notNullNoNullValue(T[] aValue, String sName) Check that the passed Array is notnulland that nonullvalue is contained.static <T> T[]notNullNoNullValue(T[] aValue, Supplier<? extends String> aName) Check that the passed Array is notnulland that nonullvalue is contained.static <T extends Iterable<?>>
TnotNullNoNullValue(T aValue, String sName) Check that the passed collection is notnulland that nonullvalue is contained.static <T extends Iterable<?>>
TnotNullNoNullValue(T aValue, Supplier<? extends String> aName) Check that the passed collection is notnulland that nonullvalue is contained.static <T> TnotNullNotEquals(T aValue, String sName, T aUnexpectedValue) Check that the passed value is notnulland not equal to the provided value.static <T> TnotNullNotEquals(T aValue, Supplier<? extends String> aName, T aUnexpectedValue) Check that the passed value is notnulland not equal to the provided value.static voidsetEnabled(boolean bEnabled) Enable or disable the checks.
-
Method Details
-
isEnabled
public static boolean isEnabled()- Returns:
trueif the assertions are enabled,falseotherwise. By default the checks are enabled.
-
setEnabled
public static void setEnabled(boolean bEnabled) Enable or disable the checks. By default checks are enabled.- Parameters:
bEnabled-trueto enable it,falseotherwise.
-
isTrue
Check that the passed value istrue.- Parameters:
bValue- The value to check.sMsg- The message to be emitted in case the value isfalse- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isTrue
Check that the passed value istrue.- Parameters:
bValue- The value to check.aMsg- The message to be emitted in case the value isfalse- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isTrue
Check that the passed value istrue.- Parameters:
aValue- The value to check.sMsg- The message to be emitted in case the value isfalse- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isTrue
public static void isTrue(@Nonnull BooleanSupplier aValue, @Nonnull Supplier<? extends String> aMsg) Check that the passed value istrue.- Parameters:
aValue- The value to check.aMsg- The message to be emitted in case the value isfalse- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isFalse
Check that the passed value isfalse.- Parameters:
bValue- The value to check.sMsg- The message to be emitted in case the value istrue- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isFalse
Check that the passed value isfalse.- Parameters:
bValue- The value to check.aMsg- The message to be emitted in case the value istrue- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isFalse
Check that the passed value isfalse.- Parameters:
aValue- The value to check.sMsg- The message to be emitted in case the value istrue- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isFalse
public static void isFalse(@Nonnull BooleanSupplier aValue, @Nonnull Supplier<? extends String> aMsg) Check that the passed value isfalse.- Parameters:
aValue- The value to check.aMsg- The message to be emitted in case the value istrue- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isInstanceOf
public static <T> void isInstanceOf(@Nullable T aValue, @Nonnull Class<? extends T> aClass, String sMsg) Check that the passed value is an instance of the passed class.- Type Parameters:
T- Type to check.- Parameters:
aValue- The value to check. May benull.aClass- The class of which the passed value must be an instance. May not benull.sMsg- The message to be emitted in case the value isfalse- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isInstanceOf
public static <T> void isInstanceOf(@Nullable T aValue, @Nonnull Class<? extends T> aClass, @Nonnull Supplier<? extends String> aMsg) Check that the passed value is an instance of the passed class.- Type Parameters:
T- Type to check.- Parameters:
aValue- The value to check. May benull.aClass- The class of which the passed value must be an instance. May not benull.aMsg- The message to be emitted in case the value isfalse- Throws:
IllegalArgumentException- if the passed value is notnull.
-
notNull
Check that the passed value is notnull.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
NullPointerException- if the passed value isnull.
-
notNull
Check that the passed value is notnull.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
NullPointerException- if the passed value isnull.
-
isNull
Check that the passed value isnull.- Parameters:
aValue- The value to check.sName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isNull
Check that the passed value isnull.- Parameters:
aValue- The value to check.aName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
notEmpty
Check that the passed String is neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
public static <T extends CharSequence> T notEmpty(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed String is neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Array is neithernullnor empty.- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passedCollectionis neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
@CodingStyleguideUnaware public static <T extends Collection<?>> T notEmpty(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passedCollectionis neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passedIterableis neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
@CodingStyleguideUnaware public static <T extends Iterable<?>> T notEmpty(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passedIterableis neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
Check that the passed Collection is neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
notEmpty
@CodingStyleguideUnaware public static <T extends Map<?,?>> T notEmpty(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed Collection is neithernullnor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The String to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty
-
noNullValue
Check that the passed Array contains nonullvalue. But the whole array can benullor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check. May benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value. Maybe
null. - Throws:
IllegalArgumentException- if the passed value is not empty and anullvalue is contained
-
noNullValue
Check that the passed Array contains nonullvalue. But the whole array can benullor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check. May benull.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value. Maybe
null. - Throws:
IllegalArgumentException- if the passed value is not empty and anullvalue is contained
-
noNullValue
Check that the passed iterable contains nonullvalue. But the whole iterable can benullor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The collection to check. May benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value. Maybe
null. - Throws:
IllegalArgumentException- if the passed value is not empty and anullvalue is contained
-
noNullValue
@Nullable public static <T extends Iterable<?>> T noNullValue(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed iterable contains nonullvalue. But the whole iterable can benullor empty.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The collection to check. May benull.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value. Maybe
null. - Throws:
IllegalArgumentException- if the passed value is not empty and anullvalue is contained
-
noNullValue
@Nullable @CodingStyleguideUnaware public static <T extends Map<?,?>> T noNullValue(T aValue, String sName) Check that the passed map is neithernullnor empty and that nonullkey or value is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The map to check. May benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value. Maybe
null. - Throws:
IllegalArgumentException- if the passed value is not empty and anullkey ornullvalue is contained
-
noNullValue
@Nullable @CodingStyleguideUnaware public static <T extends Map<?,?>> T noNullValue(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed map is neithernullnor empty and that nonullkey or value is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The map to check. May benull.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value. Maybe
null. - Throws:
IllegalArgumentException- if the passed value is not empty and anullkey ornullvalue is contained
-
notNullNoNullValue
Check that the passed Array is notnulland that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is null or anullvalue is contained
-
notNullNoNullValue
Check that the passed Array is notnulland that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is null or anullvalue is contained
-
notNullNoNullValue
Check that the passed collection is notnulland that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The collection to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value isnullor anullvalue is contained
-
notNullNoNullValue
public static <T extends Iterable<?>> T notNullNoNullValue(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed collection is notnulland that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The collection to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value isnullor anullvalue is contained
-
notNullNoNullValue
@CodingStyleguideUnaware public static <T extends Map<?,?>> T notNullNoNullValue(T aValue, String sName) Check that the passed map is notnulland that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The map to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value isnullor anullvalue is contained
-
notNullNoNullValue
@CodingStyleguideUnaware public static <T extends Map<?,?>> T notNullNoNullValue(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed map is notnulland that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The map to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value isnullor anullvalue is contained
-
notEmptyNoNullValue
Check that the passed Array is neithernullnor empty and that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty or anullvalue is contained
-
notEmptyNoNullValue
Check that the passed Array is neithernullnor empty and that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The Array to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty or anullvalue is contained
-
notEmptyNoNullValue
Check that the passed collection is neithernullnor empty and that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The collection to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty or anullvalue is contained
-
notEmptyNoNullValue
public static <T extends Iterable<?>> T notEmptyNoNullValue(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed collection is neithernullnor empty and that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The collection to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty or anullvalue is contained
-
notEmptyNoNullValue
@CodingStyleguideUnaware public static <T extends Map<?,?>> T notEmptyNoNullValue(T aValue, String sName) Check that the passed map is neithernullnor empty and that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The map to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty or anullvalue is contained
-
notEmptyNoNullValue
@CodingStyleguideUnaware public static <T extends Map<?,?>> T notEmptyNoNullValue(T aValue, @Nonnull Supplier<? extends String> aName) Check that the passed map is neithernullnor empty and that nonullvalue is contained.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The map to check.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is empty or anullvalue is contained
-
notNullNotEquals
Check that the passed value is notnulland not equal to the provided value.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)aUnexpectedValue- The value that may not be equal to aValue. May not benull.- Returns:
- The passed value.
-
notNullNotEquals
public static <T> T notNullNotEquals(T aValue, @Nonnull Supplier<? extends String> aName, @Nonnull T aUnexpectedValue) Check that the passed value is notnulland not equal to the provided value.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check. May not benull.aName- The name of the value (e.g. the parameter name)aUnexpectedValue- The value that may not be equal to aValue. May not benull.- Returns:
- The passed value.
-
notNullAndEquals
Check that the passed value is notnulland equal to the provided expected value.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.sName- The name of the value (e.g. the parameter name)aExpectedValue- The expected value. May not benull.- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is notnull.
-
notNullAndEquals
public static <T> T notNullAndEquals(T aValue, @Nonnull Supplier<? extends String> aName, @Nonnull T aExpectedValue) Check that the passed value is notnulland equal to the provided expected value.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.aName- The name of the value (e.g. the parameter name)aExpectedValue- The expected value. May not benull.- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isSame
Check that the passed value is the same as the provided expected value using==to check comparison.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.sName- The name of the value (e.g. the parameter name)aExpectedValue- The expected value. May benull.- Returns:
- The passed value and maybe
nullif the expected value is null. - Throws:
IllegalArgumentException- if the passed value is notnull.
-
isSame
public static <T> T isSame(T aValue, @Nonnull Supplier<? extends String> aName, @Nullable T aExpectedValue) Check that the passed value is the same as the provided expected value using==to check comparison.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.aName- The name of the value (e.g. the parameter name)aExpectedValue- The expected value. May benull.- Returns:
- The passed value and maybe
nullif the expected value isnull. - Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
Check that the passed value is the same as the provided expected value usingequalsto check comparison.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.aExpectedValue- The expected value. May benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value and maybe
nullif the expected value is null. - Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
public static <T> T isEqual(T aValue, @Nullable T aExpectedValue, @Nonnull Supplier<? extends String> aName) Check that the passed value is the same as the provided expected value usingequalsto check comparison.- Type Parameters:
T- Type to be checked and returned- Parameters:
aValue- The value to check.aExpectedValue- The expected value. May benull.aName- The name of the value (e.g. the parameter name)- Returns:
- The passed value and maybe
nullif the expected value is null. - Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
Check that the passed value is the same as the provided expected value using==to check comparison.- Parameters:
nValue- The First value.nExpectedValue- The expected value.sName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
public static void isEqual(int nValue, int nExpectedValue, @Nonnull Supplier<? extends String> aName) Check that the passed value is the same as the provided expected value using==to check comparison.- Parameters:
nValue- The First value.nExpectedValue- The expected value.aName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
Check that the passed value is the same as the provided expected value using==to check comparison.- Parameters:
nValue- The First value.nExpectedValue- The expected value.sName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
public static void isEqual(long nValue, long nExpectedValue, @Nonnull Supplier<? extends String> aName) Check that the passed value is the same as the provided expected value using==to check comparison.- Parameters:
nValue- The First value.nExpectedValue- The expected value.aName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
Check that the passed value is the same as the provided expected value using==to check comparison.- Parameters:
dValue- The First value.dExpectedValue- The expected value.sName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
public static void isEqual(double dValue, double dExpectedValue, @Nonnull Supplier<? extends String> aName) Check that the passed value is the same as the provided expected value using==to check comparison.- Parameters:
dValue- The First value.dExpectedValue- The expected value.aName- The name of the value (e.g. the parameter name)- Throws:
IllegalArgumentException- if the passed value is notnull.
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGE0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isGT0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isNE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLE0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isLT0
-
isBetweenInclusive
public static int isBetweenInclusive(int nValue, String sName, int nLowerBoundInclusive, int nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
nValue- ValuesName- NamenLowerBoundInclusive- Lower boundnUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static int isBetweenInclusive(int nValue, @Nonnull Supplier<? extends String> aName, int nLowerBoundInclusive, int nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
nValue- ValueaName- NamenLowerBoundInclusive- Lower boundnUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static long isBetweenInclusive(long nValue, String sName, long nLowerBoundInclusive, long nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
nValue- ValuesName- NamenLowerBoundInclusive- Lower boundnUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static long isBetweenInclusive(long nValue, @Nonnull Supplier<? extends String> aName, long nLowerBoundInclusive, long nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
nValue- ValueaName- NamenLowerBoundInclusive- Lower boundnUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static short isBetweenInclusive(short nValue, String sName, short nLowerBoundInclusive, short nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
nValue- ValuesName- NamenLowerBoundInclusive- Lower boundnUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static short isBetweenInclusive(short nValue, @Nonnull Supplier<? extends String> aName, short nLowerBoundInclusive, short nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
nValue- ValueaName- NamenLowerBoundInclusive- Lower boundnUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static double isBetweenInclusive(double dValue, String sName, double dLowerBoundInclusive, double dUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
dValue- ValuesName- NamedLowerBoundInclusive- Lower bounddUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static double isBetweenInclusive(double dValue, @Nonnull Supplier<? extends String> aName, double dLowerBoundInclusive, double dUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
dValue- ValueaName- NamedLowerBoundInclusive- Lower bounddUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static float isBetweenInclusive(float fValue, String sName, float fLowerBoundInclusive, float fUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
fValue- ValuesName- NamefLowerBoundInclusive- Lower boundfUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static float isBetweenInclusive(float fValue, @Nonnull Supplier<? extends String> aName, float fLowerBoundInclusive, float fUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
fValue- ValueaName- NamefLowerBoundInclusive- Lower boundfUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static BigDecimal isBetweenInclusive(BigDecimal aValue, String sName, @Nonnull BigDecimal aLowerBoundInclusive, @Nonnull BigDecimal aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
aValue- ValuesName- NameaLowerBoundInclusive- Lower boundaUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static BigDecimal isBetweenInclusive(BigDecimal aValue, @Nonnull Supplier<? extends String> aName, @Nonnull BigDecimal aLowerBoundInclusive, @Nonnull BigDecimal aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
aValue- ValueaName- NameaLowerBoundInclusive- Lower boundaUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static BigInteger isBetweenInclusive(BigInteger aValue, String sName, @Nonnull BigInteger aLowerBoundInclusive, @Nonnull BigInteger aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
aValue- ValuesName- NameaLowerBoundInclusive- Lower boundaUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenInclusive
public static BigInteger isBetweenInclusive(BigInteger aValue, @Nonnull Supplier<? extends String> aName, @Nonnull BigInteger aLowerBoundInclusive, @Nonnull BigInteger aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive- Parameters:
aValue- ValueaName- NameaLowerBoundInclusive- Lower boundaUpperBoundInclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static int isBetweenExclusive(int nValue, String sName, int nLowerBoundExclusive, int nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
nValue- ValuesName- NamenLowerBoundExclusive- Lower boundnUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static int isBetweenExclusive(int nValue, @Nonnull Supplier<? extends String> aName, int nLowerBoundExclusive, int nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
nValue- ValueaName- NamenLowerBoundExclusive- Lower boundnUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static long isBetweenExclusive(long nValue, String sName, long nLowerBoundExclusive, long nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
nValue- ValuesName- NamenLowerBoundExclusive- Lower boundnUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static long isBetweenExclusive(long nValue, @Nonnull Supplier<? extends String> aName, long nLowerBoundExclusive, long nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
nValue- ValueaName- NamenLowerBoundExclusive- Lower boundnUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static short isBetweenExclusive(short nValue, String sName, short nLowerBoundExclusive, short nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
nValue- ValuesName- NamenLowerBoundExclusive- Lower boundnUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static short isBetweenExclusive(short nValue, @Nonnull Supplier<? extends String> aName, short nLowerBoundExclusive, short nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
nValue- ValueaName- NamenLowerBoundExclusive- Lower boundnUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static double isBetweenExclusive(double dValue, String sName, double dLowerBoundExclusive, double dUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
dValue- ValuesName- NamedLowerBoundExclusive- Lower bounddUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static double isBetweenExclusive(double dValue, @Nonnull Supplier<? extends String> aName, double dLowerBoundExclusive, double dUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
dValue- ValueaName- NamedLowerBoundExclusive- Lower bounddUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static float isBetweenExclusive(float fValue, String sName, float fLowerBoundExclusive, float fUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
fValue- ValuesName- NamefLowerBoundExclusive- Lower boundfUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static float isBetweenExclusive(float fValue, @Nonnull Supplier<? extends String> aName, float fLowerBoundExclusive, float fUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
fValue- ValueaName- NamefLowerBoundExclusive- Lower boundfUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static BigDecimal isBetweenExclusive(BigDecimal aValue, String sName, @Nonnull BigDecimal aLowerBoundExclusive, @Nonnull BigDecimal aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
aValue- ValuesName- NameaLowerBoundExclusive- Lower boundaUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static BigDecimal isBetweenExclusive(BigDecimal aValue, @Nonnull Supplier<? extends String> aName, @Nonnull BigDecimal aLowerBoundExclusive, @Nonnull BigDecimal aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
aValue- ValueaName- NameaLowerBoundExclusive- Lower boundaUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static BigInteger isBetweenExclusive(BigInteger aValue, String sName, @Nonnull BigInteger aLowerBoundExclusive, @Nonnull BigInteger aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
aValue- ValuesName- NameaLowerBoundExclusive- Lower boundaUpperBoundExclusive- Upper bound- Returns:
- The value
-
isBetweenExclusive
public static BigInteger isBetweenExclusive(BigInteger aValue, @Nonnull Supplier<? extends String> aName, @Nonnull BigInteger aLowerBoundExclusive, @Nonnull BigInteger aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive- Parameters:
aValue- ValueaName- NameaLowerBoundExclusive- Lower boundaUpperBoundExclusive- Upper bound- Returns:
- The value
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-
isArrayOfsLen
-