T - The type of the value stored within this Option.public abstract class Option<T>
extends java.lang.Object
To create a Option, you should create a unique subclass for your data. This allows you to avoid colliding with other extensions.
Options are immutable. Subclasses should make defensive copies of any mutable data structures passed to them.
Options,
TagsOption| Modifier | Constructor and Description |
|---|---|
protected |
Option(T value)
Create a new option.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
T |
get()
Get the value of the option.
|
int |
hashCode() |
java.lang.String |
toString() |
protected Option(T value)
value - The immutable value to store in this option.public final T get()
public final boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Object