Package com.helger.base.enforce
Class ValueEnforcer
java.lang.Object
com.helger.base.enforce.ValueEnforcer
This class contains "runtime assertions" utility methods. It works like
Objects.requireNonNull(Object) but offers many more possibilities.- Author:
- Philip Helger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidisArrayOfsLen(boolean @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed boolean array.static voidisArrayOfsLen(byte @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed byte array.static voidisArrayOfsLen(char @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed char array.static voidisArrayOfsLen(double @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed double array.static voidisArrayOfsLen(float @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed float array.static voidisArrayOfsLen(int @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed int array.static voidisArrayOfsLen(long @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed long array.static voidisArrayOfsLen(short @NonNull [] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed short array.static voidisArrayOfsLen(@NonNull Object[] aArray, int nOfs, int nLen) Check that the offset and length are valid for the passed array.static doubleisBetweenExclusive(double dValue, @NonNull String sName, double dLowerBoundExclusive, double dUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic doubleisBetweenExclusive(double dValue, @NonNull Supplier<? extends String> aName, double dLowerBoundExclusive, double dUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic floatisBetweenExclusive(float fValue, @NonNull String sName, float fLowerBoundExclusive, float fUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic floatisBetweenExclusive(float fValue, @NonNull Supplier<? extends String> aName, float fLowerBoundExclusive, float fUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic intisBetweenExclusive(int nValue, @NonNull String sName, int nLowerBoundExclusive, int nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic intisBetweenExclusive(int nValue, @NonNull Supplier<? extends String> aName, int nLowerBoundExclusive, int nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic longisBetweenExclusive(long nValue, @NonNull String sName, long nLowerBoundExclusive, long nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic longisBetweenExclusive(long nValue, @NonNull Supplier<? extends String> aName, long nLowerBoundExclusive, long nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic shortisBetweenExclusive(short nValue, @NonNull String sName, short nLowerBoundExclusive, short nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic shortisBetweenExclusive(short nValue, @NonNull Supplier<? extends String> aName, short nLowerBoundExclusive, short nUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigDecimalisBetweenExclusive(@NonNull BigDecimal aValue, @NonNull String sName, @NonNull BigDecimal aLowerBoundExclusive, @NonNull BigDecimal aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigDecimalisBetweenExclusive(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName, @NonNull BigDecimal aLowerBoundExclusive, @NonNull BigDecimal aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigIntegerisBetweenExclusive(@NonNull BigInteger aValue, @NonNull String sName, @NonNull BigInteger aLowerBoundExclusive, @NonNull BigInteger aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic BigIntegerisBetweenExclusive(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName, @NonNull BigInteger aLowerBoundExclusive, @NonNull BigInteger aUpperBoundExclusive) Check ifnValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivestatic doubleisBetweenInclusive(double dValue, @NonNull String sName, double dLowerBoundInclusive, double dUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic doubleisBetweenInclusive(double dValue, @NonNull Supplier<? extends String> aName, double dLowerBoundInclusive, double dUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic floatisBetweenInclusive(float fValue, @NonNull String sName, float fLowerBoundInclusive, float fUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic floatisBetweenInclusive(float fValue, @NonNull Supplier<? extends String> aName, float fLowerBoundInclusive, float fUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic intisBetweenInclusive(int nValue, @NonNull String sName, int nLowerBoundInclusive, int nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic intisBetweenInclusive(int nValue, @NonNull Supplier<? extends String> aName, int nLowerBoundInclusive, int nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic longisBetweenInclusive(long nValue, @NonNull String sName, long nLowerBoundInclusive, long nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic longisBetweenInclusive(long nValue, @NonNull Supplier<? extends String> aName, long nLowerBoundInclusive, long nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic shortisBetweenInclusive(short nValue, @NonNull String sName, short nLowerBoundInclusive, short nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic shortisBetweenInclusive(short nValue, @NonNull Supplier<? extends String> aName, short nLowerBoundInclusive, short nUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigDecimalisBetweenInclusive(@NonNull BigDecimal aValue, @NonNull String sName, @NonNull BigDecimal aLowerBoundInclusive, @NonNull BigDecimal aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigDecimalisBetweenInclusive(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName, @NonNull BigDecimal aLowerBoundInclusive, @NonNull BigDecimal aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigIntegerisBetweenInclusive(@NonNull BigInteger aValue, @NonNull String sName, @NonNull BigInteger aLowerBoundInclusive, @NonNull BigInteger aUpperBoundInclusive) Check ifnValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivestatic BigIntegerisBetweenInclusive(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName, @NonNull BigInteger aLowerBoundInclusive, @NonNull 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(@NonNull BooleanSupplier aValue, @NonNull String sMsg) Check that the passed value isfalse.static voidisFalse(@NonNull BooleanSupplier aValue, @NonNull Supplier<? extends String> aMsg) Check that the passed value isfalse.static doubleCheck that the passed value is ≥ 0.static doubleCheck that the passed value is ≥ 0.static floatCheck that the passed value is ≥ 0.static floatCheck that the passed value is ≥ 0.static intCheck that the passed value is ≥ 0.static intCheck that the passed value is ≥ 0.static longCheck that the passed value is ≥ 0.static longCheck that the passed value is ≥ 0.static shortCheck that the passed value is ≥ 0.static shortCheck that the passed value is ≥ 0.static BigDecimalisGE0(@NonNull BigDecimal aValue, @NonNull String sName) Check that the passed value is ≥ 0.static BigDecimalisGE0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≥ 0.static BigIntegerisGE0(@NonNull BigInteger aValue, @NonNull String sName) Check that the passed value is ≥ 0.static BigIntegerisGE0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≥ 0.static doubleCheck that the passed value is > 0.static doubleCheck that the passed value is > 0.static floatCheck that the passed value is > 0.static floatCheck that the passed value is > 0.static intCheck that the passed value is > 0.static intCheck that the passed value is > 0.static longCheck that the passed value is > 0.static longCheck that the passed value is > 0.static shortCheck that the passed value is > 0.static shortCheck that the passed value is > 0.static BigDecimalisGT0(@NonNull BigDecimal aValue, @NonNull String sName) Check that the passed value is > 0.static BigDecimalisGT0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is > 0.static BigIntegerisGT0(@NonNull BigInteger aValue, @NonNull String sName) Check that the passed value is > 0.static BigIntegerisGT0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is > 0.static <T> voidisInstanceOf(@Nullable T aValue, @NonNull Class<? extends T> aClass, @NonNull String sMsg) Check that the passed value is an instance of the passed class.static <T> voidisInstanceOf(@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.static doubleCheck that the passed value is ≤ 0.static doubleCheck that the passed value is ≤ 0.static floatCheck that the passed value is ≤ 0.static floatCheck that the passed value is ≤ 0.static intCheck that the passed value is ≤ 0.static intCheck that the passed value is ≤ 0.static longCheck that the passed value is ≤ 0.static longCheck that the passed value is ≤ 0.static shortCheck that the passed value is ≤ 0.static shortCheck that the passed value is ≤ 0.static BigDecimalisLE0(@NonNull BigDecimal aValue, @NonNull String sName) Check that the passed value is ≤ 0.static BigDecimalisLE0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≤ 0.static BigIntegerisLE0(@NonNull BigInteger aValue, @NonNull String sName) Check that the passed value is ≤ 0.static BigIntegerisLE0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≤ 0.static doubleCheck that the passed value is < 0.static doubleCheck that the passed value is < 0.static floatCheck that the passed value is < 0.static floatCheck that the passed value is < 0.static intCheck that the passed value is < 0.static intCheck that the passed value is < 0.static longCheck that the passed value is < 0.static longCheck that the passed value is < 0.static shortCheck that the passed value is < 0.static shortCheck that the passed value is < 0.static BigDecimalisLT0(@NonNull BigDecimal aValue, @NonNull String sName) Check that the passed value is < 0.static BigDecimalisLT0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is < 0.static BigIntegerisLT0(@NonNull BigInteger aValue, @NonNull String sName) Check that the passed value is < 0.static BigIntegerisLT0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is < 0.static doubleCheck that the passed value is not equal to 0.static doubleCheck that the passed value is not equal to 0.static intCheck that the passed value is not equal to 0.static intCheck that the passed value is not equal to 0.static longCheck that the passed value is not equal to 0.static longCheck that the passed value is not equal to 0.static BigDecimalisNE0(@NonNull BigDecimal aValue, @NonNull String sName) Check that the passed value is not equal to 0.static BigDecimalisNE0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is not equal to 0.static BigIntegerisNE0(@NonNull BigInteger aValue, @NonNull String sName) Check that the passed value is not equal to 0.static BigIntegerisNE0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is not equal to 0.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(@NonNull BooleanSupplier aValue, @NonNull String sMsg) Check that the passed value istrue.static voidisTrue(@NonNull BooleanSupplier aValue, @NonNull Supplier<? extends String> aMsg) Check that the passed value istrue.static <T> @Nullable T[]noNullValue(@NonNull T[] aValue, @NonNull String sName) Check that the passed Array contains nonullvalue.static <T> @Nullable T[]noNullValue(@NonNull T[] aValue, @NonNull Supplier<? extends String> aName) Check that the passed Array contains nonullvalue.static <T extends Iterable<?>>
@Nullable TnoNullValue(@NonNull T aValue, @NonNull String sName) Check that the passed iterable contains nonullvalue.static <T extends Iterable<?>>
@Nullable TnoNullValue(@NonNull T aValue, @NonNull 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(@NonNull T[] aValue, @NonNull String sName) Check that the passed Array is neithernullnor empty and that nonullvalue is contained.static <T> T[]notEmptyNoNullValue(@NonNull T[] aValue, @NonNull Supplier<? extends String> aName) Check that the passed Array is neithernullnor empty and that nonullvalue is contained.static <T extends Iterable<?>>
TnotEmptyNoNullValue(@NonNull T aValue, @NonNull String sName) Check that the passed collection is neithernullnor empty and that nonullvalue is contained.static <T extends Iterable<?>>
TnotEmptyNoNullValue(@NonNull T aValue, @NonNull 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(@NonNull T aValue, @NonNull String sName, @NonNull T aExpectedValue) Check that the passed value is notnulland equal to the provided expected value.static <T> TnotNullAndEquals(@NonNull T aValue, @NonNull Supplier<? extends String> aName, @NonNull T aExpectedValue) Check that the passed value is notnulland equal to the provided expected value.static <T> T[]notNullNoNullValue(@NonNull T[] aValue, @NonNull String sName) Check that the passed Array is notnulland that nonullvalue is contained.static <T> T[]notNullNoNullValue(@NonNull T[] aValue, @NonNull Supplier<? extends String> aName) Check that the passed Array is notnulland that nonullvalue is contained.static <T extends Iterable<?>>
TnotNullNoNullValue(@NonNull T aValue, @NonNull String sName) Check that the passed collection is notnulland that nonullvalue is contained.static <T extends Iterable<?>>
TnotNullNoNullValue(@NonNull T aValue, @NonNull Supplier<? extends String> aName) Check that the passed collection is notnulland that nonullvalue is contained.static <T> TnotNullNotEquals(@NonNull T aValue, @NonNull String sName, @NonNull T aUnexpectedValue) Check that the passed value is notnulland not equal to the provided value.static <T> TnotNullNotEquals(@NonNull T aValue, @NonNull Supplier<? extends String> aName, @NonNull T aUnexpectedValue) Check that the passed value is notnulland not equal to the provided value.static voidsetEnabled(boolean bEnabled) Enable or disable the checks.
-
Field Details
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED- See Also:
-
-
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, @NonNull 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(@NonNull 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
public static boolean[] notEmpty(boolean @NonNull [] 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
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
public static double[] notEmpty(double @NonNull [] 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
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
@CodingStyleguideUnaware public static <T extends Collection<?>> T notEmpty(@NonNull T aValue, @NonNull 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(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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
public static <T> @Nullable T[] noNullValue(@NonNull 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
public static <T extends Iterable<?>> @Nullable T noNullValue(@NonNull T aValue, @NonNull 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
public static <T extends Iterable<?>> @Nullable T noNullValue(@NonNull 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
@CodingStyleguideUnaware public static <T extends Map<?,?>> @Nullable T noNullValue(@NonNull T aValue, @NonNull 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
@CodingStyleguideUnaware public static <T extends Map<?,?>> @Nullable T noNullValue(@NonNull 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
public static <T> T[] notNullNoNullValue(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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
public static <T> T[] notEmptyNoNullValue(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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(@NonNull T aValue, @NonNull 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(@NonNull 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(@Nullable 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
Check that the passed value is ≥ 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
dValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
dValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
fValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
fValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
public static BigDecimal isGE0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≥ 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
Check that the passed value is ≥ 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGE0
public static BigInteger isGE0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≥ 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is < 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
dValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
dValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
fValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
fValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
public static BigDecimal isGT0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is > 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
Check that the passed value is > 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isGT0
public static BigInteger isGT0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is > 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≤ 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
dValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
dValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
public static BigDecimal isNE0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is not equal to 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
Check that the passed value is not equal to 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isNE0
public static BigInteger isNE0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is not equal to 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
dValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
dValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
fValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
fValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
public static BigDecimal isLE0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≤ 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
Check that the passed value is ≤ 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLE0
public static BigInteger isLE0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is ≤ 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is > 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
nValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
nValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
dValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
dValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
fValue- The value to check.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
fValue- The value to check.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
public static BigDecimal isLT0(@NonNull BigDecimal aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is < 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
Check that the passed value is < 0.- Parameters:
aValue- The value to check. May not benull.sName- The name of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isLT0
public static BigInteger isLT0(@NonNull BigInteger aValue, @NonNull Supplier<? extends String> aName) Check that the passed value is < 0.- Parameters:
aValue- The value to check. May not benull.aName- The name supplier of the value (e.g. the parameter name)- Returns:
- The passed value.
- Throws:
IllegalArgumentException- if the passed value is ≥ 0.
-
isBetweenInclusive
public static int isBetweenInclusive(int nValue, @NonNull 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, @NonNull 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, @NonNull 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, @NonNull 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, @NonNull 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(@NonNull BigDecimal aValue, @NonNull 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(@NonNull 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(@NonNull BigInteger aValue, @NonNull 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(@NonNull 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, @NonNull 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, @NonNull 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, @NonNull 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, @NonNull 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, @NonNull 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(@NonNull BigDecimal aValue, @NonNull 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(@NonNull 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(@NonNull BigInteger aValue, @NonNull 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(@NonNull 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(@NonNull Object[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(boolean @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed boolean array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(byte @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed byte array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(char @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed char array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(double @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed double array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(float @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed float array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(int @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed int array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(long @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed long array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-
isArrayOfsLen
public static void isArrayOfsLen(short @NonNull [] aArray, @Nonnegative int nOfs, @Nonnegative int nLen) Check that the offset and length are valid for the passed short array.- Parameters:
aArray- The array to check. May not benull.nOfs- The offset to check. Must be ≥ 0.nLen- The length to check. Must be ≥ 0.- Throws:
IllegalArgumentException- if offset + length exceeds the array length.
-