Class CaseInsensitiveFunctionTable

java.lang.Object
com.singularsys.jep.FunctionTable
com.singularsys.jep.misc.CaseInsensitiveFunctionTable
All Implemented Interfaces:
JepComponent, Serializable

public class CaseInsensitiveFunctionTable extends FunctionTable
A version of a function table which is case-insensitive.

Note that this table does not include any functions by default. You will need to add any functions you need.

 jep = new Jep();
 jep.setComponent(new CaseInsensitiveFunctionTable());
 jep.addFunction("if",new If());
 jep.parse("if(1>0,2,3)");
 System.out.println(jep.evaluate());
 

If you want to include all the functions in an existing table you can use

 FunctionTable oldFT = jep.getFunctionTable();
 jep.setComponent(new CaseInsensitiveFunctionTable());
 for(Entry<String, PostfixMathCommandI> ent:oldFT.entrySet()) {
     jep.addFunction(ent.getKey(), ent.getValue());
 }
 
See Also: