ipipan.spejd.util
Class SimpleDict

java.lang.Object
  extended by ipipan.spejd.util.SimpleDict
Direct Known Subclasses:
ConfigDict, LexDictionary

public class SimpleDict
extends java.lang.Object

Configuration class, containing a set of variables with values.


Field Summary
protected  java.util.TreeMap<java.lang.String,java.lang.String> dict
           
 
Constructor Summary
SimpleDict()
          Creates a new configuration with no variables.
SimpleDict(java.lang.String filename)
          Creates a new configuration with variables loaded from a given filename.
 
Method Summary
 java.util.TreeMap<java.lang.String,java.lang.String> getDict()
           
 void load(java.lang.String filename)
          Loads configuration from a specified file.
 void put(java.lang.String var, java.lang.String value)
          Sets value of a configuration variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dict

protected java.util.TreeMap<java.lang.String,java.lang.String> dict
Constructor Detail

SimpleDict

public SimpleDict()
Creates a new configuration with no variables.


SimpleDict

public SimpleDict(java.lang.String filename)
Creates a new configuration with variables loaded from a given filename.

Method Detail

load

public void load(java.lang.String filename)
Loads configuration from a specified file.

Parameters:
filename - name of the configuration file

put

public void put(java.lang.String var,
                java.lang.String value)
Sets value of a configuration variable.

Parameters:
var - name of the variable to set
value - value of the variable as String

getDict

public java.util.TreeMap<java.lang.String,java.lang.String> getDict()