public class IntOptional
extends java.lang.Object
| Constructor and Description |
|---|
IntOptional()
The value defaults to unset.
|
IntOptional(int v)
Sets the value to the given argument.
|
IntOptional(IntOptional opt)
Sets the value to a shallow copy of the given optional.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Unsets this value.
|
int |
get()
Obtains the current value.
|
boolean |
isSet()
Determines whether the value is set.
|
void |
set(int v)
Sets the value to the given argument.
|
void |
set(IntOptional opt)
If the given argument is set, this optional is set to a shallow copy of the argument,
otherwise this optional is unset.
|
public IntOptional()
public IntOptional(int v)
v - The initial value.public IntOptional(IntOptional opt)
opt - The source value.public int get()
java.lang.IllegalStateException - If the value is not set.public void set(int v)
v - The new value.public void set(IntOptional opt)
opt - The source value.public boolean isSet()
public void clear()