jpaul.RegExps
Class RegExp.Star<A>

java.lang.Object
  extended by jpaul.RegExps.RegExp<A>
      extended by jpaul.RegExps.RegExp.Star<A>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Enclosing class:
RegExp<A>

public static class RegExp.Star<A>
extends RegExp<A>

The star regular expression.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jpaul.RegExps.RegExp
RegExp.Atomic<A>, RegExp.Concat<A>, RegExp.EmptyStr<A>, RegExp.None<A>, RegExp.Star<A>, RegExp.Union<A>, RegExp.Visitor<A,Res>
 
Field Summary
 RegExp<A> starred
           
 
Constructor Summary
RegExp.Star(RegExp<A> regExp)
          Creates a RegExp that matches any string that is obtained by the concatenation of a finite number of strings (possibly none), each matched by the regular expression regExp.
 
Method Summary
protected  int _hashCode()
          Does the real work behing hashCode.
<Res> Res
accept(RegExp.Visitor<A,Res> visitor)
          Method for the visitor pattern.
 boolean equals(java.lang.Object o)
           
 java.lang.String toString()
           
 
Methods inherited from class jpaul.RegExps.RegExp
buildConcat, buildUnion, hashCode, simplify
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

starred

public final RegExp<A> starred
Constructor Detail

RegExp.Star

public RegExp.Star(RegExp<A> regExp)
Creates a RegExp that matches any string that is obtained by the concatenation of a finite number of strings (possibly none), each matched by the regular expression regExp. Any Star regular expression accepts at least the empty string.

Method Detail

accept

public <Res> Res accept(RegExp.Visitor<A,Res> visitor)
Description copied from class: RegExp
Method for the visitor pattern. This method will dynamically select and execute the visit method of the visitor that corresponds to the dynamic type of the regular expression. E.g., in the case of a regular expression that is a RegExp.Concat object, accept executes the code of visit(RegExp.Concat).

Overrides:
accept in class RegExp<A>

equals

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

_hashCode

protected int _hashCode()
Description copied from class: RegExp
Does the real work behing hashCode.

Specified by:
_hashCode in class RegExp<A>
See Also:
RegExp.hashCode()

toString

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


Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu