E
- type of the error of this ValidationT
- type of the value of this Validationpublic static final class Validation.Invalid<E,T> extends Object implements Validation<E,T>, Serializable
Validation.Builder<E,T1,T2>, Validation.Builder3<E,T1,T2,T3>, Validation.Builder4<E,T1,T2,T3,T4>, Validation.Builder5<E,T1,T2,T3,T4,T5>, Validation.Builder6<E,T1,T2,T3,T4,T5,T6>, Validation.Builder7<E,T1,T2,T3,T4,T5,T6,T7>, Validation.Builder8<E,T1,T2,T3,T4,T5,T6,T7,T8>, Validation.Invalid<E,T>, Validation.Valid<E,T>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Clarifies that values have a proper equals() method implemented.
|
T |
get()
Gets the value of this Validation if is a Valid or throws if this is an Invalid
|
E |
getError()
Gets the error of this Validation if is an Invalid or throws if this is a Valid
|
int |
hashCode()
Clarifies that values have a proper hashCode() method implemented.
|
boolean |
isInvalid()
Check whether this is of type
Invalid |
boolean |
isValid()
Check whether this is of type
Valid |
String |
stringPrefix()
Returns the name of this Value type, which is used by toString().
|
String |
toString()
Clarifies that values have a proper toString() method implemented.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ap, bimap, combine, combine, combine, combine, combine, combine, combine, combine, filter, flatMap, fold, forEach, fromEither, invalid, isEmpty, isSingleValued, iterator, leftMap, map, narrow, orElse, orElse, peek, sequence, swap, toEither, valid
contains, corresponds, eq, exists, forAll, getOption, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, narrow, out, out, stderr, stdout, toArray, toCharSeq, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaOptional, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toList, toMap, toOption, toQueue, toRight, toRight, toSet, toStack, toStream, toTree, toTry, toTry, toVector
spliterator
public boolean isValid()
Validation
Valid
isValid
in interface Validation<E,T>
public boolean isInvalid()
Validation
Invalid
isInvalid
in interface Validation<E,T>
public T get() throws RuntimeException
Validation
get
in interface Validation<E,T>
get
in interface Value<T>
NoSuchElementException
- if no value is definedRuntimeException
public E getError()
Validation
getError
in interface Validation<E,T>
public boolean equals(Object obj)
Value
public int hashCode()
Value
See Object.hashCode().
public String stringPrefix()
Value
stringPrefix
in interface Value<T>
public String toString()
Value
See Object.toString().
Copyright © 2017. All Rights Reserved.