public class UniversalStateParser extends java.lang.Object implements StateParser
Constructor and Description |
---|
UniversalStateParser(Domain domain)
This parser only requires that the source domain for the states is provided.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
stateToString(State s)
Converts state s into a parsable string representation.
|
State |
stringToState(java.lang.String str)
Converts a string into a State object assuming the string representation was produced using this state parser.
|
protected Domain domain
public UniversalStateParser(Domain domain)
domain
- the domain for which the states will be converted.public java.lang.String stateToString(State s)
StateParser
stateToString
in interface StateParser
s
- the state to convertpublic State stringToState(java.lang.String str)
StateParser
stringToState
in interface StateParser
str
- a string representation of a state