|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.automaton.State
public class State
Automaton state.
Constructor Summary | |
---|---|
State()
Constructs a new state. |
Method Summary | |
---|---|
void |
addTransition(Transition t)
Adds an outgoing transition. |
int |
compareTo(State s)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object obj)
See Object.equals(java.lang.Object) . |
java.util.List<Transition> |
getSortedTransitions(boolean to_first)
Returns sorted list of outgoing transitions. |
java.util.Set<Transition> |
getTransitions()
Returns the set of outgoing transitions. |
int |
hashCode()
See Object.hashCode() . |
boolean |
isAccept()
Returns acceptance status. |
void |
setAccept(boolean accept)
Sets acceptance for this state. |
State |
step(char c)
Performs lookup in transitions, assuming determinism. |
void |
step(char c,
java.util.Collection<State> dest)
Performs lookup in transitions, allowing nondeterminism. |
java.lang.String |
toString()
Returns string describing this state. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public State()
Method Detail |
---|
public void addTransition(Transition t)
t
- transitionpublic int compareTo(State s)
compareTo
in interface java.lang.Comparable<State>
public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
.
equals
in class java.lang.Object
public java.util.List<Transition> getSortedTransitions(boolean to_first)
to_first
- if true, order by (to, min, reverse max); otherwise (min, reverse max, to)
public java.util.Set<Transition> getTransitions()
public int hashCode()
Object.hashCode()
.
hashCode
in class java.lang.Object
public boolean isAccept()
public void setAccept(boolean accept)
accept
- if true, this state is an accept statepublic State step(char c)
c
- character to look up
step(char, Collection)
public void step(char c, java.util.Collection<State> dest)
c
- character to look updest
- collection where destination states are storedstep(char)
public java.lang.String toString()
Automaton.toString()
.
toString
in class java.lang.Object
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |