|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscanner.Set
This class defines sets used to group token types while parsing.
Constructor Summary | |
Set()
Default constructor. |
|
Set(Set set)
Creates a new set from the specified one. |
|
Set(TokenType tokenType)
Creates a new set containing the specified tokenType. |
|
Set(TokenType[] tokenTypes)
Creates a new set. |
Method Summary | |
void |
add(TokenType tokenType)
Adds the specified token type in the set. |
java.lang.Object |
clone()
|
boolean |
contains(Set aSet)
|
boolean |
contains(TokenType tokenType)
Checks if a token type if contained in this set or not. |
Set |
createUnion(Set aSet)
Creates a new set containing tokens types from this set AND tokens types from the given set. |
Set |
createUnion(TokenType tokenType)
Creates a new set containing tokens types from this set AND the specified token type. |
boolean |
equals(java.lang.Object o)
|
TokenType[] |
getTypes()
Returns an array representation of the types contained in this set. |
Set |
intersect(Set aSet)
Returns a new set containing elements contained in this set AND in the given one. |
void |
remove(Set aSet)
Removes all elements of the given set from this set. |
boolean |
remove(TokenType tokenType)
Removes the spcified token type from this set. |
int |
size()
Returns the number of elements in this set. |
java.lang.String |
toString()
Returns a string representation of this set. |
Set |
union(Set aSet)
Adds the tokens types from the specified set to this set (without creating any new set). |
Set |
union(TokenType tokenType)
Performs an union with the specified token type without creating any new set. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Set(TokenType[] tokenTypes)
tokenTypes
- Token types to be put in the created set.public Set()
public Set(Set set)
set
- The set from which this set has to be initialized.public Set(TokenType tokenType)
tokenType
- Token type to be put in the created set.Method Detail |
public TokenType[] getTypes()
public int size()
public void add(TokenType tokenType)
tokenType
- The token type added in the set.public boolean remove(TokenType tokenType)
tokenType
- The token type to be removed from this set.
public boolean contains(TokenType tokenType)
tokenType
- The type of token that may be contained in this set.
public boolean contains(Set aSet)
public void remove(Set aSet)
aSet
- Elements to be removed from this set.public Set createUnion(Set aSet)
aSet
- The set to be unioned with this one.
public Set createUnion(TokenType tokenType)
tokenType
- The token type to be added to this set to create the
union result.
public Set union(Set aSet)
aSet
- A set containing tokens types to be added to this set.
public Set union(TokenType tokenType)
tokenType
- The token type to be unioned with this set.
public Set intersect(Set aSet)
aSet
- The set to be intersected with this one.
public java.lang.Object clone()
public boolean equals(java.lang.Object o)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |