org.metasyntactic.math.automata
Class Empty

java.lang.Object
  |
  +--org.metasyntactic.math.automata.AbstractRegularExpression
        |
        +--org.metasyntactic.math.automata.Empty
All Implemented Interfaces:
FiniteAutomata, RegularExpression, java.io.Serializable

public class Empty
extends AbstractRegularExpression

Class representing the Regular Expression ε. I.e. the expression ε represents the language containing the single string, namely, the empty string.

See Also:
RegularExpression, AbstractRegularExpression, RegularExpressionFactory.empty(), Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.metasyntactic.math.automata.AbstractRegularExpression
AbstractRegularExpression.NFAState
 
Field Summary
static Empty EMPTY
          The one instance of the empty language
 
Fields inherited from class org.metasyntactic.math.automata.AbstractRegularExpression
complement
 
Method Summary
 boolean equals(RegularExpression regexp)
           
 int hashCode()
           
 NondeterministicFiniteAutomata toNondeterministicFiniteAutomata()
          Returns an NFA that accepts the same regular language that this regular expression accepts.
 java.lang.String toString()
           
 
Methods inherited from class org.metasyntactic.math.automata.AbstractRegularExpression
accept, complement, concatenate, equals, equivalent, escapedRegexpChars, internalConcatenate, internalStar, internalUnion, parenthesizedRegexp, parenthesizedRegexp, properlyParenthesized, star, union
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final Empty EMPTY
The one instance of the empty language

Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface RegularExpression
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface RegularExpression
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(RegularExpression regexp)
Specified by:
equals in interface RegularExpression
Specified by:
equals in class AbstractRegularExpression

toNondeterministicFiniteAutomata

public NondeterministicFiniteAutomata toNondeterministicFiniteAutomata()
Description copied from interface: RegularExpression
Returns an NFA that accepts the same regular language that this regular expression accepts.

Returns:
An NFA equivalent to this