Class MatrixDictGet
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.BinaryFunction
com.singularsys.jep.misc.dictionary.Get
com.singularsys.extensions.matrix.dictionary.MatrixDictGet
- All Implemented Interfaces:
ZeroLengthBehaviourI,ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI,PostfixMathCommandI,Serializable
Implementation of Get compatible with the matrix package.
This version uses
Return value when key is missing is controlled by the ZeroLenghtBehaviour.
FieldI.eq(Object, Object)
to tests keys for equality so
it can also be used with the com.singularsys.extensions.field
package.
Allows
mat = [['x',2], ['y',3], ['z',4]];
get(mat,'x');
- Since:
- 4.1 extensions 2.2
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.functions.BinaryFunction
BinaryFunction.BiFunctionWithException<T>Nested classes/interfaces inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI
ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI, ZeroLengthBehaviourI.ZeroLengthErrorBehaviour, ZeroLengthBehaviourI.ZeroLengthHelper -
Field Summary
FieldsFields inherited from class com.singularsys.jep.misc.dictionary.Get
nullValue, zeroLengthHelperFields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.jep.misc.dictionary.Get
eval, eval, getErrorMessage, getZeroLengthHelperMethods inherited from class com.singularsys.jep.functions.BinaryFunction
instanceOf, instanceOf, instanceOf, instanceOf, runMethods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI
getValueOrException, zeroLengthResultOrExceptionMethods inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI
getZeroLengthErrorBehaviour, getZeroLengthValue, setZeroLengthErrorBehaviour, setZeroLengthValue
-
Field Details
-
mf
-
-
Constructor Details
-
MatrixDictGet
-
-
Method Details
-
eval
Description copied from class:BinaryFunctionEvaluate the function- Overrides:
evalin classGet- Parameters:
l- lhs argumentkey- rhs argument- Returns:
- the results
- Throws:
EvaluationException- if the function cannot be evaluated.
-
eval
- Throws:
EvaluationException
-
eval
- Throws:
EvaluationException
-
equals
Description copied from class:GetTest if key equals k. Default implementation useskey.equals(k)- Overrides:
equalsin classGet- Parameters:
key- key to testk- key to test- Returns:
- true if parameters are equal
- Throws:
EvaluationException
-