Package io.vavr.control
Class Option.Some<T>
- java.lang.Object
-
- io.vavr.control.Option<T>
-
- io.vavr.control.Option.Some<T>
-
- Type Parameters:
T
- The type of the optional value.
@Deprecated public static final class Option.Some<T> extends Option<T> implements java.io.Serializable
Deprecated.will be removed from the public APISome represents a definedOption
. It contains a value which may be null. However, to create an Option containing null,new Some(null)
has to be called. In all other casesOption.of(Object)
is sufficient.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.vavr.control.Option
Option.None<T>, Option.Some<T>
-
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Deprecated.Clarifies that values have a proper equals() method implemented.T
get()
Deprecated.Gets the value if this is aSome
or throws if this is aNone
.int
hashCode()
Deprecated.Clarifies that values have a proper hashCode() method implemented.boolean
isEmpty()
Deprecated.Returns true, if this isNone
, otherwise false, if this isSome
.java.lang.String
stringPrefix()
Deprecated.Returns the name of this Value type, which is used by toString().java.lang.String
toString()
Deprecated.Clarifies that values have a proper toString() method implemented.-
Methods inherited from class io.vavr.control.Option
collect, filter, filterNot, flatMap, fold, getOrElse, getOrElse, getOrElseThrow, isAsync, isDefined, isLazy, isSingleValued, iterator, map, narrow, none, of, ofOptional, onEmpty, orElse, orElse, peek, sequence, some, transform, traverse, when, when
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods 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
-
-
-
-
Method Detail
-
get
public T get()
Deprecated.Description copied from class:Option
Gets the value if this is aSome
or throws if this is aNone
.
-
isEmpty
public boolean isEmpty()
Deprecated.Description copied from class:Option
Returns true, if this isNone
, otherwise false, if this isSome
.
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.Description copied from interface:Value
Clarifies that values have a proper equals() method implemented.
-
hashCode
public int hashCode()
Deprecated.Description copied from interface:Value
Clarifies that values have a proper hashCode() method implemented.See Object.hashCode().
-
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 interfaceValue<T>
- 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().
-
-