Constructor and Description |
---|
SimpleToken(char token)
Creates a new instance matching the given character.
|
SimpleToken(char token,
String description)
Creates a new instance matching the given character and with the given description.
|
Modifier and Type | Method and Description |
---|---|
String |
description()
Gets a description of the token.
|
boolean |
matches(char c)
Whether the given character matchers this
Token . |
Token |
or(Token other)
A Utility to create a new
CompoundToken , combining this Token with another one. |
public SimpleToken(char token)
token
- The character.public boolean matches(char c)
Token
Token
.public String description()
Token
description
in interface Token
public Token or(Token other)
Token
CompoundToken
, combining this Token
with another one. This is useful for OR
character comparisons.or
in interface Token
other
- The other Token
.CompoundToken
instance.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.