E
- the type of the elements of the field on which all the calculations are based on.T
- the type which shall be returned by the script, after it is executed (resolved)public abstract class TensoricScript<E,T> extends TensoricExpressionSupport<E> implements Expression<T>, java.io.Serializable
TensoricExpressionSupport
such that it provides the full
capability of the eDSL.
To define a script, a field has to be given in the constructor, which describes all the operations which can be performed on its elements.
The script logic itself has to be implemented in the describe()
method. To resolve a script, a
ResolvingEngine
has to be used.
Constructor and Description |
---|
TensoricScript(EnvironmentImpl<E> environment) |
Modifier and Type | Method and Description |
---|---|
protected abstract Expression<T> |
describe() |
boolean |
equals(java.lang.Object obj) |
T |
get()
Retrieves the value of the expression.
|
java.util.List<Node> |
getChildren()
Has to return the children of the node.
|
Expression<T> |
getInternalExpression() |
int |
hashCode() |
boolean |
isResolved()
returns
true if the expression contains a concrete value. |
java.lang.String |
toString() |
averageOf, averageOf, averageOfF, calculate, calculate, calculate, calculate, calculateQ, calculateQTB, calculateT, calculateTB, elementInverseOf, elementNegativeOf, elementNegativeOfQTB, elementNegativeOfTB, inverseOf, inverseOf, inverseOf, negativeOf, negativeOf, negativeOf, one, ones, rmsOf, rmsOf, rmsOfF, sizeOf, sizeOf, squareOf, squareOf, squareRootOf, squareRootOf, sumOf, sumOf, sumOfSquaresOf, sumOfSquaresOf, testIf, testIfIt, two, valueOf, valueOf, with, withConversionAndComparator, zero, zeros
public TensoricScript(EnvironmentImpl<E> environment)
protected abstract Expression<T> describe()
public java.util.List<Node> getChildren()
Node
null
getChildren
in interface Node
public boolean isResolved()
Expression
true
if the expression contains a concrete value. Thus the method Expression.get()
can be used to
retrieve the actual value. If this method returns false
, then the get method will throw an exception.isResolved
in interface Expression<T>
true
if the value can be retrieved, false
otherwise.public T get()
Expression
get
in interface Expression<T>
public Expression<T> getInternalExpression()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object