Package com.strobel.core
Class VerifyArgument
java.lang.Object
com.strobel.core.VerifyArgument
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]
elementsOfType
(Class<?> elementType, T[] values, String parameterName) static <T> T[]
elementsOfTypeOrNull
(Class<T> elementType, T[] values, String parameterName) private static Class
<?> getBoxedType
(Class<?> type) static double
static int
static <T> T
instanceOf
(Class<T> type, Object value, String parameterName) static double
isNegative
(double value, String parameterName) static int
isNegative
(int value, String parameterName) static double
isNonNegative
(double value, String parameterName) static int
isNonNegative
(int value, String parameterName) static double
static int
static double
isPositive
(double value, String parameterName) static int
isPositive
(int value, String parameterName) static <T> T[]
noNullElements
(T[] array, int offset, int length, String parameterName) static <T> T[]
noNullElements
(T[] array, String parameterName) static <T extends Iterable<?>>
TnoNullElements
(T collection, String parameterName) static <T> T[]
noNullElementsAndNotEmpty
(T[] array, int offset, int length, String parameterName) static <T> T[]
noNullElementsAndNotEmpty
(T[] array, String parameterName) static <T extends Iterable<?>>
TnoNullElementsAndNotEmpty
(T collection, String parameterName) static String
static <T> T[]
static <T extends Iterable<?>>
Tstatic <T> T
notInstanceOf
(Class<T> type, Object value, String parameterName) static <T> T
static String
notNullOrEmpty
(String value, String parameterName) static String
notNullOrWhitespace
(String value, String parameterName) static int
validElementRange
(int size, int startInclusive, int endExclusive)
-
Constructor Details
-
VerifyArgument
private VerifyArgument()
-
-
Method Details
-
notNull
-
notEmpty
-
notEmpty
-
noNullElements
-
noNullElements
-
noNullElements
-
noNullElementsAndNotEmpty
-
noNullElementsAndNotEmpty
public static <T> T[] noNullElementsAndNotEmpty(T[] array, int offset, int length, String parameterName) -
noNullElementsAndNotEmpty
-
elementsOfType
-
elementsOfTypeOrNull
-
validElementRange
public static int validElementRange(int size, int startInclusive, int endExclusive) -
notNullOrEmpty
-
notNullOrWhitespace
-
notBlank
-
isNonZero
-
isPositive
-
isNonNegative
-
isNegative
-
inRange
-
isNonZero
-
isPositive
-
isNonNegative
-
isNegative
-
inRange
public static double inRange(double minInclusive, double maxInclusive, double value, String parameterName) -
instanceOf
-
notInstanceOf
-
getBoxedType
-