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