public final class Const<T> extends Val<T> implements Serializable
Const operation is a
terminal operation.
final static Op<Double> PI = Const.of("π", Math.PI);
final static Op<Double> ONE = Const.of(1.0);| Modifier and Type | Method and Description |
|---|---|
static <T> Const<T> |
of(String name,
T value)
Return a new constant with the given name and value.
|
static <T> Const<T> |
of(T value)
Return a new constant with the given value.
|
String |
toString() |
T |
value()
Return the constant value.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitget, isTerminal, ofpublic static <T> Const<T> of(String name, T value)
of in interface Op<T>T - the constant typename - the constant namevalue - the constant valueNullPointerException - if the given constant name is
null© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)