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