public final class Const<T> extends Object implements Op<T>
final static Op<Double> PI = Const.of("π", Math.PI);
final static Op<Double> ONE = Const.of(1.0);| Modifier and Type | Method and Description |
|---|---|
T |
apply(T[] value) |
int |
arity()
Return the arity of the operation function.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
name()
Return the name of the operation.
|
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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitget, isTerminal, ofpublic int arity()
Oppublic static <T> Const<T> of(String name, T value)
T - the constant typename - the constant namevalue - the constant valueNullPointerException - if the given constant name is
null© 2007-2017 Franz Wilhelmstötter (2017-08-22 19:30)