org.metasyntactic.math.automata
Class Star

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

public class Star
extends AbstractRegularExpression

Class representing the Regular Expression R*.

See Also:
RegularExpression, AbstractRegularExpression, Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.metasyntactic.math.automata.AbstractRegularExpression
AbstractRegularExpression.NFAState
 
Field Summary
 
Fields inherited from class org.metasyntactic.math.automata.AbstractRegularExpression
complement
 
Constructor Summary
Star(RegularExpression item)
          Constructs a new RegularExpression equal to item*
 
Method Summary
 boolean equals(RegularExpression regexp)
           
 boolean equals(Star kleene)
           
 int hashCode()
           
protected  RegularExpression internalConcatenate(RegularExpression regexp)
           
 NondeterministicFiniteAutomata toNaiveNFA()
           
 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, internalStar, internalUnion, parenthesizedRegexp, parenthesizedRegexp, properlyParenthesized, star, union
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Star

public Star(RegularExpression item)
Constructs a new RegularExpression equal to item*

Method Detail

internalConcatenate

protected RegularExpression internalConcatenate(RegularExpression regexp)
Overrides:
internalConcatenate in class AbstractRegularExpression

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

equals

public boolean equals(Star kleene)

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

toNaiveNFA

public NondeterministicFiniteAutomata toNaiveNFA()