public final class Options
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Options |
EMPTY
The empty option set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
<V,O extends Option<V>> |
get(java.lang.Class<O> optionClass)
Get an option of the given type.
|
int |
hashCode() |
<T> Options |
set(Option<T> option)
Set an option.
|
java.lang.String |
toString() |
<O extends Option<?>> |
unset(java.lang.Class<O> optionClass)
Un-sets an option.
|
public static final Options EMPTY
public <V,O extends Option<V>> java.util.Optional<V> get(java.lang.Class<O> optionClass)
V
- The type of the value stored in the option.O
- The type of the option.optionClass
- The class that corresponds to the option.public <O extends Option<?>> Options unset(java.lang.Class<O> optionClass)
O
- The type of the option.optionClass
- The class of the option to un-set.public <T> Options set(Option<T> option)
T
- The type of the option.option
- The option to store.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object