public class StateYAMLParser extends java.lang.Object implements StateParser
Modifier and Type | Field and Description |
---|---|
protected Domain |
domain
The domain holding the object class definitions that states represented in yaml strings will be converted to.
|
Constructor and Description |
---|
StateYAMLParser(Domain domain)
Initializes with a a given domain object.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getYAMLPrepared(State s)
Returns the data structure of a state that is passed to YAML.
|
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 StateYAMLParser(Domain domain)
domain
- the domain object to which state objects will be associated.public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getYAMLPrepared(State s)
s
- the input state to turn into a YAML prepared datastructurepublic 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