Package io.vavr.control
Class Option.None<T>
java.lang.Object
io.vavr.control.Option.None<T>
- Type Parameters:
T- The type of the optional value.
- All Implemented Interfaces:
Option<T>,Value<T>,Serializable,Iterable<T>
None is a singleton representation of the undefined
Option.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vavr.control.Option
Option.None<T>, Option.Some<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Option.None<?> The singleton instance of None.private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanClarifies that values have a proper equals() method implemented.get()Returns the value contained in thisSome, or throws if this isNone.inthashCode()Clarifies that values have a proper hashCode() method implemented.booleanisEmpty()Checks whether thisOptionis empty.private ObjectInstance control for object serialization.Returns the name of this Value type, which is used by toString().toString()Clarifies that values have a proper toString() method implemented.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.vavr.control.Option
collect, filter, flatMap, fold, getOrElse, getOrElse, getOrElseThrow, isAsync, isDefined, isLazy, isSingleValued, iterator, map, mapTo, mapToVoid, mapTry, onEmpty, orElse, orElse, peek, transformMethods inherited from interface io.vavr.Value
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElseTry, getOrNull, out, out, spliterator, stderr, stdout, toArray, toCharSeq, toCompletableFuture, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toLinkedMap, toLinkedMap, toLinkedSet, toList, toMap, toMap, toOption, toPriorityQueue, toPriorityQueue, toQueue, toRight, toRight, toSet, toSortedMap, toSortedMap, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toStream, toTree, toTree, toTry, toTry, toValid, toValid, toValidation, toValidation, toVector
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSTANCE
The singleton instance of None.
-
-
Constructor Details
-
None
private None()Hidden constructor.
-
-
Method Details
-
get
Description copied from interface:OptionReturns the value contained in thisSome, or throws if this isNone. -
isEmpty
public boolean isEmpty()Description copied from interface:OptionChecks whether thisOptionis empty. -
equals
Description copied from interface:ValueClarifies that values have a proper equals() method implemented. -
hashCode
public int hashCode()Description copied from interface:ValueClarifies that values have a proper hashCode() method implemented.See Object.hashCode().
-
stringPrefix
Description copied from interface:ValueReturns the name of this Value type, which is used by toString().- Specified by:
stringPrefixin interfaceValue<T>- Returns:
- This type name.
-
toString
Description copied from interface:ValueClarifies that values have a proper toString() method implemented.See Object.toString().
-
readResolve
Instance control for object serialization.- Returns:
- The singleton instance of None.
- See Also:
-