@Immutable public final class ValueEnforcer extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
isArrayOfsLen(boolean[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(byte[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(char[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(double[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(float[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(int[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(long[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(Object[] aArray,
int nOfs,
int nLen) |
static void |
isArrayOfsLen(short[] aArray,
int nOfs,
int nLen) |
static BigDecimal |
isBetweenExclusive(BigDecimal aValue,
String sName,
BigDecimal aLowerBoundExclusive,
BigDecimal aUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static BigInteger |
isBetweenExclusive(BigInteger aValue,
String sName,
BigInteger aLowerBoundExclusive,
BigInteger aUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static double |
isBetweenExclusive(double dValue,
String sName,
double dLowerBoundExclusive,
double dUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static float |
isBetweenExclusive(float fValue,
String sName,
float fLowerBoundExclusive,
float fUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static int |
isBetweenExclusive(int nValue,
String sName,
int nLowerBoundExclusive,
int nUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static long |
isBetweenExclusive(long nValue,
String sName,
long nLowerBoundExclusive,
long nUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static short |
isBetweenExclusive(short nValue,
String sName,
short nLowerBoundExclusive,
short nUpperBoundExclusive)
Check if
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusive |
static BigDecimal |
isBetweenInclusive(BigDecimal aValue,
String sName,
BigDecimal aLowerBoundInclusive,
BigDecimal aUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static BigInteger |
isBetweenInclusive(BigInteger aValue,
String sName,
BigInteger aLowerBoundInclusive,
BigInteger aUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static double |
isBetweenInclusive(double dValue,
String sName,
double dLowerBoundInclusive,
double dUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static float |
isBetweenInclusive(float fValue,
String sName,
float fLowerBoundInclusive,
float fUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static int |
isBetweenInclusive(int nValue,
String sName,
int nLowerBoundInclusive,
int nUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static long |
isBetweenInclusive(long nValue,
String sName,
long nLowerBoundInclusive,
long nUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static short |
isBetweenInclusive(short nValue,
String sName,
short nLowerBoundInclusive,
short nUpperBoundInclusive)
Check if
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusive |
static BigDecimal |
isGE0(BigDecimal aValue,
String sName) |
static BigInteger |
isGE0(BigInteger aValue,
String sName) |
static double |
isGE0(double dValue,
String sName) |
static float |
isGE0(float fValue,
String sName) |
static int |
isGE0(int nValue,
String sName) |
static long |
isGE0(long nValue,
String sName) |
static short |
isGE0(short nValue,
String sName) |
static BigDecimal |
isGT0(BigDecimal aValue,
String sName) |
static BigInteger |
isGT0(BigInteger aValue,
String sName) |
static double |
isGT0(double dValue,
String sName) |
static float |
isGT0(float fValue,
String sName) |
static int |
isGT0(int nValue,
String sName) |
static long |
isGT0(long nValue,
String sName) |
static short |
isGT0(short nValue,
String sName) |
static BigDecimal |
isLE0(BigDecimal aValue,
String sName) |
static BigInteger |
isLE0(BigInteger aValue,
String sName) |
static double |
isLE0(double dValue,
String sName) |
static float |
isLE0(float fValue,
String sName) |
static int |
isLE0(int nValue,
String sName) |
static long |
isLE0(long nValue,
String sName) |
static short |
isLE0(short nValue,
String sName) |
static BigDecimal |
isLT0(BigDecimal aValue,
String sName) |
static BigInteger |
isLT0(BigInteger aValue,
String sName) |
static double |
isLT0(double dValue,
String sName) |
static float |
isLT0(float fValue,
String sName) |
static int |
isLT0(int nValue,
String sName) |
static long |
isLT0(long nValue,
String sName) |
static short |
isLT0(short nValue,
String sName) |
static boolean[] |
notEmpty(boolean[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static byte[] |
notEmpty(byte[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static char[] |
notEmpty(char[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static double[] |
notEmpty(double[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static float[] |
notEmpty(float[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static int[] |
notEmpty(int[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static long[] |
notEmpty(long[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static short[] |
notEmpty(short[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static <T> T[] |
notEmpty(T[] aValue,
String sName)
Check that the passed Array is neither
null nor empty. |
static <T extends CharSequence> |
notEmpty(T aValue,
String sName)
Check that the passed String is neither
null nor empty. |
static <T extends Iterable<?>> |
notEmpty(T aValue,
String sName)
Check that the passed Iterable is neither
null nor empty. |
static <T extends Collection<?>> |
notEmpty(T aValue,
String sName)
Check that the passed Collection is neither
null nor empty. |
static <T extends Map<?,?>> |
notEmpty(T aValue,
String sName)
Check that the passed Collection is neither
null nor empty. |
static <T> T[] |
notEmptyNoNullValue(T[] aValue,
String sName)
Check that the passed Array is neither
null nor empty and that
no null value is contained. |
static <T extends Iterable<?>> |
notEmptyNoNullValue(T aValue,
String sName)
Check that the passed collection is neither
null nor empty and
that no null value is contained. |
static <T extends Collection<?>> |
notEmptyNoNullValue(T aValue,
String sName)
Check that the passed collection is neither
null nor empty and
that no null value is contained. |
static <T> T |
notNull(T aValue,
String sName)
Check that the passed value is not
null. |
static <T> T |
notNullNotEquals(T aValue,
String sName,
T aUnexpectedValue)
Check that the passed value is not
null and not equal to . |
@Nonnull public static <T> T notNull(T aValue, String sName)
null.aValue - The value to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T extends CharSequence> T notEmpty(T aValue, String sName)
null nor empty.aValue - The String to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T> T[] notEmpty(T[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static boolean[] notEmpty(boolean[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static byte[] notEmpty(byte[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static char[] notEmpty(char[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static double[] notEmpty(double[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static float[] notEmpty(float[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static int[] notEmpty(int[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static long[] notEmpty(long[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static short[] notEmpty(short[] aValue, String sName)
null nor empty.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T extends Collection<?>> T notEmpty(T aValue, String sName)
null nor empty.aValue - The String to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T extends Iterable<?>> T notEmpty(T aValue, String sName)
null nor empty.aValue - The String to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T extends Map<?,?>> T notEmpty(T aValue, String sName)
null nor empty.aValue - The String to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T> T[] notEmptyNoNullValue(T[] aValue, String sName)
null nor empty and that
no null value is contained.aValue - The Array to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T extends Iterable<?>> T notEmptyNoNullValue(T aValue, String sName)
null nor empty and
that no null value is contained.aValue - The collection to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T extends Collection<?>> T notEmptyNoNullValue(T aValue, String sName)
null nor empty and
that no null value is contained.aValue - The collection to check.sName - The name of the value (e.g. the parameter name)null.@Nonnull public static <T> T notNullNotEquals(@Nonnull T aValue, String sName, @Nonnull T aUnexpectedValue)
null and not equal to .aValue - The value to check. May not be null.sName - The name of the value (e.g. the parameter name)aUnexpectedValue - The value that may not be equal to aValue. May not be
null.null.public static short isGE0(short nValue,
String sName)
public static int isGE0(int nValue,
String sName)
public static long isGE0(long nValue,
String sName)
public static double isGE0(double dValue,
String sName)
public static float isGE0(float fValue,
String sName)
@Nonnull public static BigDecimal isGE0(@Nonnull BigDecimal aValue, String sName)
@Nonnull public static BigInteger isGE0(@Nonnull BigInteger aValue, String sName)
public static short isGT0(short nValue,
String sName)
public static int isGT0(int nValue,
String sName)
public static long isGT0(long nValue,
String sName)
public static double isGT0(double dValue,
String sName)
public static float isGT0(float fValue,
String sName)
@Nonnull public static BigDecimal isGT0(@Nonnull BigDecimal aValue, String sName)
@Nonnull public static BigInteger isGT0(@Nonnull BigInteger aValue, String sName)
public static short isLE0(short nValue,
String sName)
public static int isLE0(int nValue,
String sName)
public static long isLE0(long nValue,
String sName)
public static double isLE0(double dValue,
String sName)
public static float isLE0(float fValue,
String sName)
@Nonnull public static BigDecimal isLE0(@Nonnull BigDecimal aValue, String sName)
@Nonnull public static BigInteger isLE0(@Nonnull BigInteger aValue, String sName)
public static short isLT0(short nValue,
String sName)
public static int isLT0(int nValue,
String sName)
public static long isLT0(long nValue,
String sName)
public static double isLT0(double dValue,
String sName)
public static float isLT0(float fValue,
String sName)
@Nonnull public static BigDecimal isLT0(@Nonnull BigDecimal aValue, String sName)
@Nonnull public static BigInteger isLT0(@Nonnull BigInteger aValue, String sName)
public static short isBetweenInclusive(short nValue,
String sName,
short nLowerBoundInclusive,
short nUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivenValue - ValuesName - NamenLowerBoundInclusive - Lower boundnUpperBoundInclusive - Upper boundpublic static int isBetweenInclusive(int nValue,
String sName,
int nLowerBoundInclusive,
int nUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivenValue - ValuesName - NamenLowerBoundInclusive - Lower boundnUpperBoundInclusive - Upper boundpublic static long isBetweenInclusive(long nValue,
String sName,
long nLowerBoundInclusive,
long nUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivenValue - ValuesName - NamenLowerBoundInclusive - Lower boundnUpperBoundInclusive - Upper boundpublic static float isBetweenInclusive(float fValue,
String sName,
float fLowerBoundInclusive,
float fUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivefValue - ValuesName - NamefLowerBoundInclusive - Lower boundfUpperBoundInclusive - Upper boundpublic static double isBetweenInclusive(double dValue,
String sName,
double dLowerBoundInclusive,
double dUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusivedValue - ValuesName - NamedLowerBoundInclusive - Lower bounddUpperBoundInclusive - Upper boundpublic static BigDecimal isBetweenInclusive(@Nonnull BigDecimal aValue, String sName, @Nonnull BigDecimal aLowerBoundInclusive, @Nonnull BigDecimal aUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusiveaValue - ValuesName - NameaLowerBoundInclusive - Lower boundaUpperBoundInclusive - Upper boundpublic static BigInteger isBetweenInclusive(@Nonnull BigInteger aValue, String sName, @Nonnull BigInteger aLowerBoundInclusive, @Nonnull BigInteger aUpperBoundInclusive)
nValue ≥ nLowerBoundInclusive && nValue ≤ nUpperBoundInclusiveaValue - ValuesName - NameaLowerBoundInclusive - Lower boundaUpperBoundInclusive - Upper boundpublic static short isBetweenExclusive(short nValue,
String sName,
short nLowerBoundExclusive,
short nUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivenValue - ValuesName - NamenLowerBoundExclusive - Lower boundnUpperBoundExclusive - Upper boundpublic static int isBetweenExclusive(int nValue,
String sName,
int nLowerBoundExclusive,
int nUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivenValue - ValuesName - NamenLowerBoundExclusive - Lower boundnUpperBoundExclusive - Upper boundpublic static long isBetweenExclusive(long nValue,
String sName,
long nLowerBoundExclusive,
long nUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivenValue - ValuesName - NamenLowerBoundExclusive - Lower boundnUpperBoundExclusive - Upper boundpublic static float isBetweenExclusive(float fValue,
String sName,
float fLowerBoundExclusive,
float fUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivefValue - ValuesName - NamefLowerBoundExclusive - Lower boundfUpperBoundExclusive - Upper boundpublic static double isBetweenExclusive(double dValue,
String sName,
double dLowerBoundExclusive,
double dUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusivedValue - ValuesName - NamedLowerBoundExclusive - Lower bounddUpperBoundExclusive - Upper boundpublic static BigDecimal isBetweenExclusive(@Nonnull BigDecimal aValue, String sName, @Nonnull BigDecimal aLowerBoundExclusive, @Nonnull BigDecimal aUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusiveaValue - ValuesName - NameaLowerBoundExclusive - Lower boundaUpperBoundExclusive - Upper boundpublic static BigInteger isBetweenExclusive(@Nonnull BigInteger aValue, String sName, @Nonnull BigInteger aLowerBoundExclusive, @Nonnull BigInteger aUpperBoundExclusive)
nValue > nLowerBoundInclusive && nValue < nUpperBoundInclusiveaValue - ValuesName - NameaLowerBoundExclusive - Lower boundaUpperBoundExclusive - Upper boundpublic static void isArrayOfsLen(@Nonnull Object[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull boolean[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull byte[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull char[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull double[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull float[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull int[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull long[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
public static void isArrayOfsLen(@Nonnull short[] aArray, @Nonnegative int nOfs, @Nonnegative int nLen)
Copyright © 2006–2015 phloc systems. All rights reserved.