JaCoP.util.fsm
Class RegularExpressionParser.Literal

java.lang.Object
  extended by JaCoP.util.fsm.RegularExpressionParser.Expression
      extended by JaCoP.util.fsm.RegularExpressionParser.Literal
Enclosing class:
RegularExpressionParser

public class RegularExpressionParser.Literal
extends RegularExpressionParser.Expression

It specifies a simple literal.


Field Summary
 java.lang.String lit
          String denoting the literal.
 
Constructor Summary
RegularExpressionParser.Literal(java.lang.String lit)
          It constructs a literal.
 
Method Summary
 boolean equals(java.lang.Object c)
           
 int getType()
          If the given string contains the words that this Expression object requires, this method returns an array of ints.
 boolean isSimple()
          It specifies if the expression is simple.
 FSM parseToFSM()
          It creates Finite State Machine from the expression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lit

public java.lang.String lit
String denoting the literal.

Constructor Detail

RegularExpressionParser.Literal

public RegularExpressionParser.Literal(java.lang.String lit)
It constructs a literal.

Parameters:
lit - string representation of the literal.
Method Detail

getType

public int getType()
Description copied from class: RegularExpressionParser.Expression
If the given string contains the words that this Expression object requires, this method returns an array of ints. In most cases, the array contains the offsets of the words in the string that are required by this combination. However, if the array is empty, then all the words in the string satisfy the Expression. If the given string does not contain the words that this Expression object requires, then this method returns null.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object c)
Overrides:
equals in class java.lang.Object

isSimple

public boolean isSimple()
Description copied from class: RegularExpressionParser.Expression
It specifies if the expression is simple.

Overrides:
isSimple in class RegularExpressionParser.Expression
Returns:
true if expression is a literal or disjunction of literals.

parseToFSM

public FSM parseToFSM()
Description copied from class: RegularExpressionParser.Expression
It creates Finite State Machine from the expression.

Specified by:
parseToFSM in class RegularExpressionParser.Expression
Returns:
Finite State Machine corresponding