Class Remove
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.BinaryFunction
com.singularsys.jep.misc.dictionary.Remove
- All Implemented Interfaces:
PostfixMathCommandI,Serializable
Removes entries with matching key from the map.
The function returns either the value or the removed key
or
map = {'x':2, 'y':3};
remove(map, 'x');
nullValue if the key is missing the key has no value.- Since:
- Jep 4.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.functions.BinaryFunction
BinaryFunction.BiFunctionWithException<T> -
Field Summary
FieldsFields 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.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, toString
-
Field Details
-
nullValue
-
-
Constructor Details
-
Remove
Constructor- Parameters:
nullValue- , value returned when a key has no value or if no key exists.
-
-
Method Details
-
eval
Description copied from class:BinaryFunctionEvaluate the function- Specified by:
evalin classBinaryFunction- Parameters:
l- lhs argumentkey- rhs argument- Returns:
- the results
- Throws:
EvaluationException- if the function cannot be evaluated.
-
eval
-
eval
- Throws:
EvaluationException
-
equals
Test if key equals k. Default implementation useskey.equals(k)- Parameters:
key- key to testk- key to test- Returns:
- true if parameters are equal
- Throws:
EvaluationException
-