Class Validation.Invalid<E,​T>

  • Type Parameters:
    E - type of the error of this Validation
    T - type of the value of this Validation
    All Implemented Interfaces:
    Iterable<T>, Value<T>, java.io.Serializable, java.lang.Iterable<T>
    Enclosing class:
    Validation<E,​T>

    @Deprecated
    public static final class Validation.Invalid<E,​T>
    extends Validation<E,​T>
    implements java.io.Serializable
    Deprecated.
    will be removed from the public API
    An invalid Validation
    See Also:
    Serialized Form
    • Method Detail

      • isValid

        public boolean isValid()
        Deprecated.
        Description copied from class: Validation
        Check whether this is of type Valid
        Specified by:
        isValid in class Validation<E,​T>
        Returns:
        true if is a Valid, false if is an Invalid
      • isInvalid

        public boolean isInvalid()
        Deprecated.
        Description copied from class: Validation
        Check whether this is of type Invalid
        Specified by:
        isInvalid in class Validation<E,​T>
        Returns:
        true if is an Invalid, false if is a Valid
      • get

        public T get()
              throws java.lang.RuntimeException
        Deprecated.
        Description copied from class: Validation
        Gets the value of this Validation if is a Valid or throws if this is an Invalid.
        Specified by:
        get in interface Value<E>
        Specified by:
        get in class Validation<E,​T>
        Returns:
        The value of this Validation
        Throws:
        java.lang.RuntimeException
      • getError

        public E getError()
        Deprecated.
        Description copied from class: Validation
        Gets the error of this Validation if it is an Invalid or throws if this is a Valid.
        Specified by:
        getError in class Validation<E,​T>
        Returns:
        The error, if present
      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Description copied from interface: Value
        Clarifies that values have a proper equals() method implemented.

        See Object.equals(Object).

        Specified by:
        equals in interface Value<E>
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - An object
        Returns:
        true, if this equals o, false otherwise
      • hashCode

        public int hashCode()
        Deprecated.
        Description copied from interface: Value
        Clarifies that values have a proper hashCode() method implemented.

        See Object.hashCode().

        Specified by:
        hashCode in interface Value<E>
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hashcode of this object
      • stringPrefix

        public java.lang.String stringPrefix()
        Deprecated.
        Description copied from interface: Value
        Returns the name of this Value type, which is used by toString().
        Specified by:
        stringPrefix in interface Value<E>
        Returns:
        This type name.
      • toString

        public java.lang.String toString()
        Deprecated.
        Description copied from interface: Value
        Clarifies that values have a proper toString() method implemented.

        See Object.toString().

        Specified by:
        toString in interface Value<E>
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of this object