Package net.sf.basedb.util.jep
Class FunctionSafeJep.SafeFunctionTable
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable
org.nfunk.jep.FunctionTable
net.sf.basedb.util.jep.FunctionSafeJep.SafeFunctionTable
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
- Enclosing class:
- FunctionSafeJep
static class FunctionSafeJep.SafeFunctionTable extends FunctionTable
Function table implementation that pretends that all possible functions
exists, but sends an error message if someone tries to use a function that
doesn't really exists.
-
Field Summary
Fields Modifier and Type Field Description private FunctionSafeJep
jep
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SafeFunctionTable(FunctionSafeJep jep)
-
Method Summary
Modifier and Type Method Description boolean
containsKey(Object key)
If the key is already registered, return TRUE.private String
nextToken(String token)
Get the next token in the parser.private void
readObject(ObjectInputStream ois)
private void
writeObject(ObjectOutputStream ois)
Methods inherited from class org.nfunk.jep.FunctionTable
get, get, put, put
Methods inherited from class java.util.Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
jep
-
-
Constructor Details
-
SafeFunctionTable
SafeFunctionTable(FunctionSafeJep jep)
-
-
Method Details
-
containsKey
If the key is already registered, return TRUE. If the key is not registered and is a function, register it as an unknown function, set an error message and return TRUE. Otherwise return FALSE.- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classHashtable
-
nextToken
Get the next token in the parser. If this is a "(", the parse is currently looking up a function name.- Parameters:
token
- The current token
-
readObject
- Throws:
ClassNotFoundException
IOException
-
writeObject
- Throws:
IOException
-