Class VerifyArgument

java.lang.Object
com.strobel.core.VerifyArgument

public final class VerifyArgument extends Object
  • Constructor Details

    • VerifyArgument

      private VerifyArgument()
  • Method Details

    • notNull

      public static <T> T notNull(T value, String parameterName)
    • notEmpty

      public static <T> T[] notEmpty(T[] array, String parameterName)
    • notEmpty

      public static <T extends Iterable<?>> T notEmpty(T collection, String parameterName)
    • noNullElements

      public static <T> T[] noNullElements(T[] array, String parameterName)
    • noNullElements

      public static <T> T[] noNullElements(T[] array, int offset, int length, String parameterName)
    • noNullElements

      public static <T extends Iterable<?>> T noNullElements(T collection, String parameterName)
    • noNullElementsAndNotEmpty

      public static <T> T[] noNullElementsAndNotEmpty(T[] array, String parameterName)
    • noNullElementsAndNotEmpty

      public static <T> T[] noNullElementsAndNotEmpty(T[] array, int offset, int length, String parameterName)
    • noNullElementsAndNotEmpty

      public static <T extends Iterable<?>> T noNullElementsAndNotEmpty(T collection, String parameterName)
    • elementsOfType

      public static <T> T[] elementsOfType(Class<?> elementType, T[] values, String parameterName)
    • elementsOfTypeOrNull

      public static <T> T[] elementsOfTypeOrNull(Class<T> elementType, T[] values, String parameterName)
    • validElementRange

      public static int validElementRange(int size, int startInclusive, int endExclusive)
    • notNullOrEmpty

      public static String notNullOrEmpty(String value, String parameterName)
    • notNullOrWhitespace

      public static String notNullOrWhitespace(String value, String parameterName)
    • notBlank

      public static String notBlank(String value, String parameterName)
    • isNonZero

      public static int isNonZero(int value, String parameterName)
    • isPositive

      public static int isPositive(int value, String parameterName)
    • isNonNegative

      public static int isNonNegative(int value, String parameterName)
    • isNegative

      public static int isNegative(int value, String parameterName)
    • inRange

      public static int inRange(int minInclusive, int maxInclusive, int value, String parameterName)
    • isNonZero

      public static double isNonZero(double value, String parameterName)
    • isPositive

      public static double isPositive(double value, String parameterName)
    • isNonNegative

      public static double isNonNegative(double value, String parameterName)
    • isNegative

      public static double isNegative(double value, String parameterName)
    • inRange

      public static double inRange(double minInclusive, double maxInclusive, double value, String parameterName)
    • instanceOf

      public static <T> T instanceOf(Class<T> type, Object value, String parameterName)
    • notInstanceOf

      public static <T> T notInstanceOf(Class<T> type, Object value, String parameterName)
    • getBoxedType

      private static Class<?> getBoxedType(Class<?> type)