2.17.2: 2011-06-17

net.sf.basedb.util.jep
Class FunctionSafeJep.SafeFunctionTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by org.nfunk.jep.FunctionTable
              extended by 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
private  FunctionSafeJep jep
           
private static long serialVersionUID
           
 
Constructor Summary
FunctionSafeJep.SafeFunctionTable(FunctionSafeJep jep)
           
 
Method Summary
 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, contains, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

jep

private final FunctionSafeJep jep
Constructor Detail

FunctionSafeJep.SafeFunctionTable

FunctionSafeJep.SafeFunctionTable(FunctionSafeJep jep)
Method Detail

containsKey

public boolean containsKey(Object key)
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 interface Map
Overrides:
containsKey in class Hashtable

nextToken

private String nextToken(String token)
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

private void readObject(ObjectInputStream ois)
                 throws ClassNotFoundException,
                        IOException
Throws:
ClassNotFoundException
IOException

writeObject

private void writeObject(ObjectOutputStream ois)
                  throws IOException
Throws:
IOException

2.17.2: 2011-06-17