Package com.helger.commons
Class ValueEnforcer
- java.lang.Object
-
- com.helger.commons.ValueEnforcer
-
@Immutable public final class ValueEnforcer extends Object
This class contains "runtime assertions" utility methods. It works likeObjects.requireNonNull(Object)but offers many more possibilities.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 booleanisEnabled()static voidisEqual(double dValue, double dExpectedValue, String sName)Check that the passed value is the same as the provided expected value using==to check comparison.static voidisEqual(double dValue, double dExpectedValue, Supplier<? extends String> aName)Check that the passed value is the same as the provided expected value using==to check comparison.static voidisEqual(int nValue, int nExpectedValue, String sName)Check that the passed value is the same as the provided expected value using==to check comparison.static voidisEqual(int nValue, int nExpectedValue, Supplier<? extends String> aName)Check that the passed value is the same as the provided expected value using==to check comparison.static voidisEqual(long nValue, long nExpectedValue, String sName)Check that the passed value is the same as the provided expected value using==to check comparison.static voidisEqual(long nValue, long nExpectedValue, Supplier<? extends String> aName)Check that the passed value is the same as the provided expected value using==to check comparison.static <T> TisEqual(T aValue, T aExpectedValue, String sName)Check that the passed value is the same as the provided expected value usingequalsto check comparison.static <T> TisEqual(T aValue, T aExpectedValue, Supplier<? extends String> aName)Check that the passed value is the same as the provided expected value usingequalsto check comparison.static voidisFalse(boolean bValue, String sMsg)Check that the passed value isfalse.static voidisFalse(boolean bValue, Supplier<? extends String> aMsg)Check 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 doubleisGE0(double dValue, String sName)static doubleisGE0(double dValue, Supplier<? extends String> aName)static floatisGE0(float fValue, String sName)static floatisGE0(float fValue, Supplier<? extends String> aName)static intisGE0(int nValue, String sName)static intisGE0(int nValue, Supplier<? extends String> aName)static longisGE0(long nValue, String sName)static longisGE0(long nValue, Supplier<? extends String> aName)static shortisGE0(short nValue, String sName)static shortisGE0(short nValue, Supplier<? extends String> aName)static 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 doubleisGT0(double dValue, String sName)static doubleisGT0(double dValue, Supplier<? extends String> aName)static floatisGT0(float fValue, String sName)static floatisGT0(float fValue, Supplier<? extends String> aName)static intisGT0(int nValue, String sName)static intisGT0(int nValue, Supplier<? extends String> aName)static longisGT0(long nValue, String sName)static longisGT0(long nValue, Supplier<? extends String> aName)static shortisGT0(short nValue, String sName)static shortisGT0(short nValue, Supplier<? extends String> aName)static 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 doubleisLE0(double dValue, String sName)static doubleisLE0(double dValue, Supplier<? extends String> aName)static floatisLE0(float fValue, String sName)static floatisLE0(float fValue, Supplier<? extends String> aName)static intisLE0(int nValue, String sName)static intisLE0(int nValue, Supplier<? extends String> aName)static longisLE0(long nValue, String sName)static longisLE0(long nValue, Supplier<? extends String> aName)static shortisLE0(short nValue, String sName)static shortisLE0(short nValue, Supplier<? extends String> aName)static 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 doubleisLT0(double dValue, String sName)static doubleisLT0(double dValue, Supplier<? extends String> aName)static floatisLT0(float fValue, String sName)static floatisLT0(float fValue, Supplier<? extends String> aName)static intisLT0(int nValue, String sName)static intisLT0(int nValue, Supplier<? extends String> aName)static longisLT0(long nValue, String sName)static longisLT0(long nValue, Supplier<? extends String> aName)static shortisLT0(short nValue, String sName)static shortisLT0(short nValue, Supplier<? extends String> aName)static 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 doubleisNE0(double dValue, String sName)static doubleisNE0(double dValue, Supplier<? extends String> aName)static intisNE0(int nValue, String sName)static intisNE0(int nValue, Supplier<? extends String> aName)static longisNE0(long nValue, String sName)static longisNE0(long nValue, Supplier<? extends String> aName)static 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 voidisNull(Object aValue, String sName)Check that the passed value isnull.static voidisNull(Object aValue, Supplier<? extends String> aName)Check that the passed value isnull.static <T> TisSame(T aValue, String sName, T aExpectedValue)Check that the passed value is the same as the provided expected value using==to check comparison.static <T> TisSame(T aValue, Supplier<? extends String> aName, T aExpectedValue)Check that the passed value is the same as the provided expected value using==to check comparison.static voidisTrue(boolean bValue, String sMsg)Check that the passed value istrue.static voidisTrue(boolean bValue, Supplier<? extends String> aMsg)Check 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[]notEmpty(boolean[] aValue, String sName)Check that the passed Array is neithernullnor empty.static boolean[]notEmpty(boolean[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static byte[]notEmpty(byte[] aValue, String sName)Check that the passed Array is neithernullnor empty.static byte[]notEmpty(byte[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static char[]notEmpty(char[] aValue, String sName)Check that the passed Array is neithernullnor empty.static char[]notEmpty(char[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static double[]notEmpty(double[] aValue, String sName)Check that the passed Array is neithernullnor empty.static double[]notEmpty(double[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static float[]notEmpty(float[] aValue, String sName)Check that the passed Array is neithernullnor empty.static float[]notEmpty(float[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static int[]notEmpty(int[] aValue, String sName)Check that the passed Array is neithernullnor empty.static int[]notEmpty(int[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static long[]notEmpty(long[] aValue, String sName)Check that the passed Array is neithernullnor empty.static long[]notEmpty(long[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static short[]notEmpty(short[] aValue, String sName)Check that the passed Array is neithernullnor empty.static short[]notEmpty(short[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static <T> T[]notEmpty(T[] aValue, String sName)Check that the passed Array is neithernullnor empty.static <T> T[]notEmpty(T[] aValue, Supplier<? extends String> aName)Check that the passed Array is neithernullnor empty.static <T extends CharSequence>
TnotEmpty(T aValue, String sName)Check that the passed String is neithernullnor empty.static <T extends CharSequence>
TnotEmpty(T aValue, Supplier<? extends String> aName)Check 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> TnotNull(T aValue, String sName)Check that the passed value is notnull.static <T> TnotNull(T aValue, Supplier<? extends String> aName)Check 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 Detail
-
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
public static void isTrue(boolean bValue, String sMsg)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
public static void isTrue(boolean bValue, @Nonnull Supplier<? extends String> aMsg)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
public static void isTrue(@Nonnull BooleanSupplier aValue, String sMsg)
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
public static void isFalse(boolean bValue, String sMsg)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
public static void isFalse(boolean bValue, @Nonnull Supplier<? extends String> aMsg)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
public static void isFalse(@Nonnull BooleanSupplier aValue, String sMsg)
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
public static <T> T notNull(T aValue, String sName)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
public static <T> T notNull(T aValue, @Nonnull Supplier<? extends String> aName)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
public static void isNull(Object aValue, String sName)
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
public static void isNull(Object aValue, @Nonnull Supplier<? extends String> aName)
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
public static <T extends CharSequence> T notEmpty(T aValue, String sName)
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
public static <T> T[] notEmpty(T[] aValue, String sName)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
public static <T> T[] notEmpty(T[] aValue, @Nonnull Supplier<? extends String> aName)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
public static boolean[] notEmpty(boolean[] aValue, String sName)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
public static boolean[] notEmpty(boolean[] aValue, @Nonnull Supplier<? extends String> aName)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
public static byte[] notEmpty(byte[] aValue, String sName)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
public static byte[] notEmpty(byte[] aValue, @Nonnull Supplier<? extends String> aName)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
public static char[] notEmpty(char[] aValue, String sName)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
public static char[] notEmpty(char[] aValue, @Nonnull Supplier<? extends String> aName)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
public static double[] notEmpty(double[] aValue, String sName)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
public static double[] notEmpty(double[] aValue, @Nonnull Supplier<? extends String> aName)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
public static float[] notEmpty(float[] aValue, String sName)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
public static float[] notEmpty(float[] aValue, @Nonnull Supplier<? extends String> aName)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
public static int[] notEmpty(int[] aValue, String sName)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
public static int[] notEmpty(int[] aValue, @Nonnull Supplier<? extends String> aName)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
public static long[] notEmpty(long[] aValue, String sName)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
public static long[] notEmpty(long[] aValue, @Nonnull Supplier<? extends String> aName)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
public static short[] notEmpty(short[] aValue, String sName)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
public static short[] notEmpty(short[] aValue, @Nonnull Supplier<? extends String> aName)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
@CodingStyleguideUnaware public static <T extends Collection<?>> T notEmpty(T aValue, String sName)
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
@CodingStyleguideUnaware public static <T extends Iterable<?>> T notEmpty(T aValue, String sName)
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
@CodingStyleguideUnaware public static <T extends Map<?,?>> T notEmpty(T aValue, String sName)
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
@Nullable public static <T> T[] noNullValue(T[] aValue, String sName)
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
@Nullable public static <T> T[] noNullValue(T[] aValue, @Nonnull Supplier<? extends String> aName)
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
@Nullable public static <T extends Iterable<?>> T noNullValue(T aValue, String sName)
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
public static <T> T[] notNullNoNullValue(T[] aValue, String sName)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
public static <T> T[] notNullNoNullValue(T[] aValue, @Nonnull Supplier<? extends String> aName)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
public static <T extends Iterable<?>> T notNullNoNullValue(T aValue, String sName)
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
public static <T> T[] notEmptyNoNullValue(T[] aValue, String sName)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
public static <T> T[] notEmptyNoNullValue(T[] aValue, @Nonnull Supplier<? extends String> aName)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
public static <T extends Iterable<?>> T notEmptyNoNullValue(T aValue, String sName)
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
public static <T> T notNullNotEquals(T aValue, String sName, @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.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
public static <T> T notNullAndEquals(T aValue, String sName, @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.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
public static <T> T isSame(T aValue, String sName, @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.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
public static <T> T isEqual(T aValue, @Nullable T aExpectedValue, String sName)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.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.
-
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.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 is null. - Throws:
IllegalArgumentException- if the passed value is notnull.
-
isEqual
public static void isEqual(int nValue, int nExpectedValue, String sName)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
public static void isEqual(long nValue, long nExpectedValue, String sName)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
public static void isEqual(double dValue, double dExpectedValue, String sName)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
public static int isGE0(int nValue, String sName)
-
isGE0
public static long isGE0(long nValue, String sName)
-
isGE0
public static short isGE0(short nValue, String sName)
-
isGE0
public static double isGE0(double dValue, String sName)
-
isGE0
public static float isGE0(float fValue, String sName)
-
isGE0
public static BigDecimal isGE0(BigDecimal aValue, String sName)
-
isGE0
public static BigDecimal isGE0(BigDecimal aValue, @Nonnull Supplier<? extends String> aName)
-
isGE0
public static BigInteger isGE0(BigInteger aValue, String sName)
-
isGE0
public static BigInteger isGE0(BigInteger aValue, @Nonnull Supplier<? extends String> aName)
-
isGT0
public static int isGT0(int nValue, String sName)
-
isGT0
public static long isGT0(long nValue, String sName)
-
isGT0
public static short isGT0(short nValue, String sName)
-
isGT0
public static double isGT0(double dValue, String sName)
-
isGT0
public static float isGT0(float fValue, String sName)
-
isGT0
public static BigDecimal isGT0(BigDecimal aValue, String sName)
-
isGT0
public static BigDecimal isGT0(BigDecimal aValue, @Nonnull Supplier<? extends String> aName)
-
isGT0
public static BigInteger isGT0(BigInteger aValue, String sName)
-
isGT0
public static BigInteger isGT0(BigInteger aValue, @Nonnull Supplier<? extends String> aName)
-
isNE0
public static int isNE0(int nValue, String sName)
-
isNE0
public static long isNE0(long nValue, String sName)
-
isNE0
public static double isNE0(double dValue, String sName)
-
isNE0
public static BigDecimal isNE0(BigDecimal aValue, String sName)
-
isNE0
public static BigDecimal isNE0(BigDecimal aValue, @Nonnull Supplier<? extends String> aName)
-
isNE0
public static BigInteger isNE0(BigInteger aValue, String sName)
-
isNE0
public static BigInteger isNE0(BigInteger aValue, @Nonnull Supplier<? extends String> aName)
-
isLE0
public static int isLE0(int nValue, String sName)
-
isLE0
public static long isLE0(long nValue, String sName)
-
isLE0
public static short isLE0(short nValue, String sName)
-
isLE0
public static double isLE0(double dValue, String sName)
-
isLE0
public static float isLE0(float fValue, String sName)
-
isLE0
public static BigDecimal isLE0(BigDecimal aValue, String sName)
-
isLE0
public static BigDecimal isLE0(BigDecimal aValue, @Nonnull Supplier<? extends String> aName)
-
isLE0
public static BigInteger isLE0(BigInteger aValue, String sName)
-
isLE0
public static BigInteger isLE0(BigInteger aValue, @Nonnull Supplier<? extends String> aName)
-
isLT0
public static int isLT0(int nValue, String sName)
-
isLT0
public static long isLT0(long nValue, String sName)
-
isLT0
public static short isLT0(short nValue, String sName)
-
isLT0
public static double isLT0(double dValue, String sName)
-
isLT0
public static float isLT0(float fValue, String sName)
-
isLT0
public static BigDecimal isLT0(BigDecimal aValue, String sName)
-
isLT0
public static BigDecimal isLT0(BigDecimal aValue, @Nonnull Supplier<? extends String> aName)
-
isLT0
public static BigInteger isLT0(BigInteger aValue, String sName)
-
isLT0
public static BigInteger isLT0(BigInteger aValue, @Nonnull Supplier<? extends String> aName)
-
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
public static void isArrayOfsLen(Object[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(boolean[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(byte[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(char[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(double[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(float[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(int[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(long[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
isArrayOfsLen
public static void isArrayOfsLen(short[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
-
-