gate.creole.morph
Class StringSet

java.lang.Object
  extended by gate.creole.morph.Variable
      extended by gate.creole.morph.StringSet

public class StringSet
extends Variable

Title: StringSet

Description: This is one of the variable types that is allowed to define. It stores different possible strings for this variable The format of the value of this variable should be

"string1" OR "string2" OR "string3" ...


Field Summary
 
Fields inherited from class gate.creole.morph.Variable
pointer, varValue
 
Constructor Summary
StringSet()
          Constructor
 
Method Summary
 boolean contains(String value)
          A method that tells if value is available in the StringSet
 boolean hasNext()
          Tells if any value available which can be retrieved
 String next()
          Returns the next available value for this variable
 boolean set(String varName, String varValue)
          Process the provided value and stores in the underlying data structure
 
Methods inherited from class gate.creole.morph.Variable
getPattern, resetPointer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSet

public StringSet()
Constructor

Method Detail

hasNext

public boolean hasNext()
Tells if any value available which can be retrieved

Specified by:
hasNext in class Variable
Returns:
true if value available, false otherwise

next

public String next()
Returns the next available value for this variable

Specified by:
next in class Variable
Returns:
value of the variable in the String format

set

public boolean set(String varName,
                   String varValue)
Process the provided value and stores in the underlying data structure

Specified by:
set in class Variable
Parameters:
varName - name of the variable
varValue - String that contains possible different values
Returns:
true if successfully stored, false otherwise (means some syntax error)

contains

public boolean contains(String value)
A method that tells if value is available in the StringSet

Specified by:
contains in class Variable
Parameters:
value - String that is to be searched in the String set
Returns:
true if value found in the StringSet, false otherwise