GATE
Version 3.1-2270

gate.creole.morph
Class Storage

java.lang.Object
  extended by gate.creole.morph.Storage

public class Storage
extends Object

Title: Storage.java

Description: This class is used as the storage in the system, where all the declared variables and their appropriate values are stored


Constructor Summary
Storage()
          Constructor
 
Method Summary
 boolean add(String varName, String varValue)
          Adds the variable name and its value into the hashTable
 String get(String varName)
          This method looks into the hashtable and searches for the value of the given variable
 String[] getVarNames()
          This method returns names of all the variables available in the hashtable
 boolean isExist(String varName)
          This method checks for the existance of the variable into the hashtable
 void update(String varName, String varValue)
          Update the variable with the new value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Storage

public Storage()
Constructor

Method Detail

add

public boolean add(String varName,
                   String varValue)
Adds the variable name and its value into the hashTable

Parameters:
varName - name of the variable
varValue - value for the variable
Returns:
true if variable doesnot exist, false otherwise

get

public String get(String varName)
This method looks into the hashtable and searches for the value of the given variable

Parameters:
varName -
Returns:
value of the variable if variable found in the table,null otherwise

isExist

public boolean isExist(String varName)
This method checks for the existance of the variable into the hashtable

Parameters:
varName -
Returns:
true if variable exists, false otherwise

update

public void update(String varName,
                   String varValue)
Update the variable with the new value. If variable doesnot exist, add it to the hashtable

Parameters:
varName - name of the variable to be updated, or added
varValue - value of the variable

getVarNames

public String[] getVarNames()
This method returns names of all the variables available in the hashtable

Returns:
array of Strings - names of the variables

GATE
Version 3.1-2270