public static class RegularExpression.RegExState extends Object implements Comparable<RegularExpression.RegExState>
| Modifier and Type | Field and Description |
|---|---|
int |
id
Id for toString
|
static int |
idcounter
Counts all RegExStates to have an id for each (for toString)
|
List<RegularExpression.RegExState> |
successors
Holds all positions that can follow from here
|
String |
token
Holds the token name at the current position
|
| Constructor and Description |
|---|
RegExState(String token)
Constructs a RegExChunk with a token
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSuccessor(RegularExpression.RegExState s)
Adds one successor
|
void |
addSuccessors(Collection<RegularExpression.RegExState> s)
Adds multiple successors
|
int |
compareTo(RegularExpression.RegExState o) |
String |
describe()
Returns a nice description string
|
protected void |
describe(StringBuilder b,
Collection<RegularExpression.RegExState> done)
Helper method for describe()
|
boolean |
equals(Object o) |
List<RegularExpression.RegExState> |
getSuccessors()
Returns the successors
|
String |
getToken()
Returns the token
|
int |
hashCode() |
void |
setToken(String t)
Changes the token
|
String |
toString()
Returns the id and the token
|
public static int idcounter
public final int id
public List<RegularExpression.RegExState> successors
public String token
public RegExState(String token)
public void setToken(String t)
public void addSuccessor(RegularExpression.RegExState s)
public void addSuccessors(Collection<RegularExpression.RegExState> s)
public String getToken()
public List<RegularExpression.RegExState> getSuccessors()
public String describe()
protected void describe(StringBuilder b, Collection<RegularExpression.RegExState> done)
public int compareTo(RegularExpression.RegExState o)
compareTo in interface Comparable<RegularExpression.RegExState>Copyright © 2018. All rights reserved.