All Known Subinterfaces:
JavaValidators

public interface JavaCheckIf
Creates validators for the Java API that capture exceptions on validation failure rather than throwing them immediately.
  • Method Details

    • checkIf

      PrimitiveByteValidator checkIf(byte value, String name)
      Validates the state of a byte.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveByteValidator checkIf(byte value)
      Validates the state of a byte.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      ByteValidator checkIf(Byte value, String name)
      Validates the state of a Byte.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      ByteValidator checkIf(Byte value)
      Validates the state of a Byte.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveShortValidator checkIf(short value, String name)
      Validates the state of a short.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveShortValidator checkIf(short value)
      Validates the state of a short.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      ShortValidator checkIf(Short value, String name)
      Validates the state of a Short.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      ShortValidator checkIf(Short value)
      Validates the state of a Short.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveIntegerValidator checkIf(int value, String name)
      Validates the state of an int.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveIntegerValidator checkIf(int value)
      Validates the state of an int.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      IntegerValidator checkIf(Integer value, String name)
      Validates the state of an Integer.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      IntegerValidator checkIf(Integer value)
      Validates the state of an Integer.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveLongValidator checkIf(long value, String name)
      Validates the state of a long.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveLongValidator checkIf(long value)
      Validates the state of a long.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      LongValidator checkIf(Long value, String name)
      Validates the state of a Long.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      LongValidator checkIf(Long value)
      Validates the state of a Long.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveFloatValidator checkIf(float value, String name)
      Validates the state of a float.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveFloatValidator checkIf(float value)
      Validates the state of a float.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      FloatValidator checkIf(Float value, String name)
      Validates the state of a Float.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      FloatValidator checkIf(Float value)
      Validates the state of a Float.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveDoubleValidator checkIf(double value, String name)
      Validates the state of a double.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveDoubleValidator checkIf(double value)
      Validates the state of a double.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      DoubleValidator checkIf(Double value, String name)
      Validates the state of a Double.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      DoubleValidator checkIf(Double value)
      Validates the state of a Double.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveBooleanValidator checkIf(boolean value, String name)
      Validates the state of a boolean.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty
    • checkIf

      PrimitiveBooleanValidator checkIf(boolean value)
      Validates the state of a boolean.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      BooleanValidator checkIf(Boolean value, String name)
      Validates the state of a Boolean.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      BooleanValidator checkIf(Boolean value)
      Validates the state of a Boolean.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveCharacterValidator checkIf(char value, String name)
      Validates the state of a char.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveCharacterValidator checkIf(char value)
      Validates the state of a char.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      CharacterValidator checkIf(Character value, String name)
      Validates the state of a Character.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      CharacterValidator checkIf(Character value)
      Validates the state of a Character.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      BigIntegerValidator checkIf(BigInteger value, String name)
      Validates the state of a BigInteger.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      Validates the state of a BigInteger.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      BigDecimalValidator checkIf(BigDecimal value, String name)
      Validates the state of a BigDecimal.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      Validates the state of a BigDecimal.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T extends Comparable<T>> ComparableValidator<T> checkIf(T value, String name)
      Validates the state of a Comparable object.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T extends Comparable<T>> ComparableValidator<T> checkIf(T value)
      Validates the state of a Comparable object.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T> ObjectValidator<T> checkIf(T value, String name)
      Validates the state of an Object.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T> ObjectValidator<T> checkIf(T value)
      Validates the state of an Object.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T extends Collection<E>, E> CollectionValidator<T,E> checkIf(T value, String name)
      Validates the state of a Collection.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      E - the type of elements in the collection
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T extends Collection<E>, E> CollectionValidator<T,E> checkIf(T value)
      Validates the state of a Collection.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      E - the type of elements in the collection
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T extends List<E>, E> ListValidator<T,E> checkIf(T value, String name)
      Validates the state of a List.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      E - the type of elements in the list
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T extends List<E>, E> ListValidator<T,E> checkIf(T value)
      Validates the state of a List.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the value
      E - the type of elements in the list
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveByteArrayValidator checkIf(byte[] value, String name)
      Validates the state of a primitive byte array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveByteArrayValidator checkIf(byte[] value)
      Validates the state of a primitive byte array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveShortArrayValidator checkIf(short[] value, String name)
      Validates the state of a primitive short array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveShortArrayValidator checkIf(short[] value)
      Validates the state of a primitive short array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveIntegerArrayValidator checkIf(int[] value, String name)
      Validates the state of a primitive int array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveIntegerArrayValidator checkIf(int[] value)
      Validates the state of a primitive int array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveLongArrayValidator checkIf(long[] value, String name)
      Validates the state of a primitive long array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveLongArrayValidator checkIf(long[] value)
      Validates the state of a primitive long array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveFloatArrayValidator checkIf(float[] value, String name)
      Validates the state of a primitive float array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveFloatArrayValidator checkIf(float[] value)
      Validates the state of a primitive float array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveDoubleArrayValidator checkIf(double[] value, String name)
      Validates the state of a primitive double array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveDoubleArrayValidator checkIf(double[] value)
      Validates the state of a primitive double array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveBooleanArrayValidator checkIf(boolean[] value, String name)
      Validates the state of a primitive boolean array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveBooleanArrayValidator checkIf(boolean[] value)
      Validates the state of a primitive boolean array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PrimitiveCharacterArrayValidator checkIf(char[] value, String name)
      Validates the state of a primitive char array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PrimitiveCharacterArrayValidator checkIf(char[] value)
      Validates the state of a primitive char array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <E> ObjectArrayValidator<E[],E> checkIf(E[] value, String name)
      Validates the state of an Object array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      E - the type of elements in the array
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <E> ObjectArrayValidator<E[],E> checkIf(E[] value)
      Validates the state of an Object array.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      E - the type of elements in the array
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T extends Map<K, V>, K, V> MapValidator<T,K,V> checkIf(T value, String name)
      Validates the state of a Map.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the map
      K - the type of keys in the map
      V - the type of values in the map
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T extends Map<K, V>, K, V> MapValidator<T,K,V> checkIf(T value)
      Validates the state of a Map.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the map
      K - the type of keys in the map
      V - the type of values in the map
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      PathValidator checkIf(Path value, String name)
      Validates the state of a Path.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      PathValidator checkIf(Path value)
      Validates the state of a Path.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      StringValidator checkIf(String value, String name)
      Validates the state of a String.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      StringValidator checkIf(String value)
      Validates the state of a String.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      UriValidator checkIf(URI value, String name)
      Validates the state of a URI.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      UriValidator checkIf(URI value)
      Validates the state of a URI.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T> GenericTypeValidator<T> checkIf(Class<T> value)
      Validates the state of a Class.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the class modelled by the Class object. For types that contain type-parameters, use the TypeToken overload.
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T> GenericTypeValidator<T> checkIf(GenericType<T> value)
      Validates the state of a Class.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the class modelled by the Class object. For types without type-parameters, prefer the Class overload.
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      <T> GenericTypeValidator<T> checkIf(Class<T> value, String name)
      Validates the state of a Class.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the class modelled by the Class object. For types that contain type-parameters, use the TypeToken overload.
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T> GenericTypeValidator<T> checkIf(GenericType<T> value, String name)
      Validates the state of a Class.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of the class modelled by the Class object. For types without type-parameters, prefer the Class overload.
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T> OptionalValidator<T> checkIf(Optional<T> value, String name)
      Validates the state of an Optional.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of optional
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      <T> OptionalValidator<T> checkIf(Optional<T> value)
      Validates the state of an Optional.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Type Parameters:
      T - the type of optional
      Parameters:
      value - the value
      Returns:
      a validator for the value
    • checkIf

      InetAddressValidator checkIf(InetAddress value, String name)
      Validates the state of an InetAddress.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace or is empty
    • checkIf

      Validates the state of an InetAddress.

      The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.

      Parameters:
      value - the value
      Returns:
      a validator for the value