public class ProductionPatternElement
extends java.lang.Object
Constructor and Description |
---|
ProductionPatternElement(boolean isToken,
int id,
int min,
int max)
Creates a new element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks if this object is equal to another.
|
int |
getId()
Returns the node identity.
|
int |
getMaxCount()
Returns the maximum occurence count.
|
int |
getMinCount()
Returns the minimum occurence count.
|
int |
hashCode()
Returns a hash code for this object.
|
boolean |
isMatch(Token token)
Checks if a specific token matches this element.
|
boolean |
isProduction()
Returns true if this element represents a production.
|
boolean |
isToken()
Returns true if this element represents a token.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public ProductionPatternElement(boolean isToken, int id, int min, int max)
isToken
- the token flagid
- the node identitymin
- the minimum number of occuranciesmax
- the maximum number of occurancies, or
negative for infinitepublic boolean isToken()
public boolean isProduction()
public boolean isMatch(Token token)
token
- the token to checkpublic int getId()
public int getMinCount()
public int getMaxCount()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare withpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object