GATE
Version 3.1-2270

gate.creole.morph
Class Variable

java.lang.Object
  extended by gate.creole.morph.Variable
Direct Known Subclasses:
CharacterRange, CharacterSet, StringSet

public abstract class Variable
extends Object

Description: This is an interface which should be implemented by every new variable type. Variable here is considered to have more than one values. Example of built-in varilables for morpher are StringSet, CharacterRange, CharacterSet.


Field Summary
protected  int pointer
           
protected  String varName
          name of the variable
protected  String varValue
          value of the variable
 
Constructor Summary
Variable()
           
 
Method Summary
abstract  boolean contains(String varValue)
          should tell variable has one of the values with varValue
 String getPattern()
          this method returns the formatted pattern, which could be recognized by the regular expressions
abstract  boolean hasNext()
          method tells if next element is available to fetch
abstract  String next()
          should return the next element in the variable
 void resetPointer()
          resets the pointer to the begining
abstract  boolean set(String varName, String pattern)
          Sets the variable name and pattern for the variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pointer

protected int pointer

varName

protected String varName
name of the variable


varValue

protected String varValue
value of the variable

Constructor Detail

Variable

public Variable()
Method Detail

hasNext

public abstract boolean hasNext()
method tells if next element is available to fetch


next

public abstract String next()
should return the next element in the variable


set

public abstract boolean set(String varName,
                            String pattern)
Sets the variable name and pattern for the variable


contains

public abstract boolean contains(String varValue)
should tell variable has one of the values with varValue


getPattern

public String getPattern()
this method returns the formatted pattern, which could be recognized by the regular expressions


resetPointer

public void resetPointer()
resets the pointer to the begining


GATE
Version 3.1-2270