public class TokenSet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static TokenSet |
ANY |
static TokenSet |
EMPTY |
static TokenSet |
WHITE_SPACE |
Modifier and Type | Method and Description |
---|---|
static TokenSet |
andNot(TokenSet a,
TokenSet b)
Returns a token set containing a result of "set subtraction" of set B from set A.
|
static TokenSet |
andSet(TokenSet a,
TokenSet b)
Returns a token set containing the intersection of the specified token sets.
|
boolean |
contains(IElementType t)
Checks if the specified element type is contained in the set.
|
static TokenSet |
create(IElementType... types)
Returns a new token set containing the specified element types.
|
static TokenSet |
forAllMatching(IElementType.Predicate condition) |
IElementType [] |
getTypes()
Returns the array of element types contained in the set.
|
static TokenSet |
orSet(TokenSet... sets)
Returns a token set containing the union of the specified token sets.
|
java.lang.String |
toString() |
public static final TokenSet EMPTY
public static final TokenSet ANY
public static final TokenSet WHITE_SPACE
public boolean contains(IElementType t)
t
- the element type to search for.public IElementType [] getTypes()
public java.lang.String toString()
toString
in class java.lang.Object
public static TokenSet create(IElementType... types)
types
- the element types contained in the set.public static TokenSet forAllMatching(IElementType.Predicate condition)
public static TokenSet orSet(TokenSet... sets)
sets
- the token sets to unite.public static TokenSet andSet(TokenSet a, TokenSet b)
a
- the first token set to intersect.b
- the second token set to intersect.