public class BigDecTieBreakComparative extends BigDecRelational
Its intended this function would be used with the MinMax function and ensures
consistancy so min(2.0,2.00)==2.0
and
min(2.00,2.0)==2.0
irrespective of the order.
To use
jep.addFunction("min",new MinMax(new BigDecTieBreakComparative(BigDecRelational.LT))); jep.addFunction("max",new MinMax(new BigDecTieBreakComparative(BigDecRelational.GT)));
MinMax
,
Serialized Formid
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
BigDecTieBreakComparative(int id)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
compare(java.lang.Object l,
java.lang.Object r) |
eval, getAllowStrings, setAllowStrings
eq, ge, getId, getTolerance, gt, le, lt, ne, setTolerance
run
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
public BigDecTieBreakComparative(int id)
id
- must be either LT or GTjava.lang.IllegalArgumentException
- if id is LE, GE, EQ or NEpublic boolean compare(java.lang.Object l, java.lang.Object r) throws EvaluationException
compare
in class BigDecRelational
EvaluationException
Copyright © 2018 Singular Systems http://www.singularsys.com/jep