org.nfunk.jep
Class FunctionTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by org.nfunk.jep.FunctionTable
All Implemented Interfaces:
Serializable, Cloneable, Map

public class FunctionTable
extends Hashtable

See Also:
Serialized Form

Constructor Summary
FunctionTable()
           
 
Method Summary
 Object get(Object o)
          overrides the standard hashtable method.
 PostfixMathCommandI get(String s)
          returns the PostfixMathCommandI for function with name s.
 Object put(Object o, Object p)
          overrides the standard hashtable method.
 Object put(String s, PostfixMathCommandI pfmc)
          adds the PostfixMathCommandI for the function with name s.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, 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
 

Constructor Detail

FunctionTable

public FunctionTable()
Method Detail

put

public Object put(String s,
                  PostfixMathCommandI pfmc)
adds the PostfixMathCommandI for the function with name s. RJM addition Oct 03


put

public Object put(Object o,
                  Object p)
overrides the standard hashtable method. If the arguments are of the wrong type then throws ClassCastException RJM addition Oct 03 TODO is Hashtable always index by Strings?

Specified by:
put in interface Map
Overrides:
put in class Hashtable

get

public PostfixMathCommandI get(String s)
returns the PostfixMathCommandI for function with name s. RJM addition Oct 03


get

public Object get(Object o)
overrides the standard hashtable method. If the argument is of the wrong type (i.e. not a String) then throws ClassCastException RJM addition Oct 03

Specified by:
get in interface Map
Overrides:
get in class Hashtable


Copyright © 2014. All rights reserved.