public final class StateMachines extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StateMachines.OutputFormat
Enumeration of output formats for serializing state machine definitions.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Set<T> |
getEventsTypesFrom(StateMachine<?,?,T> fsm) |
static <S> Set<S> |
getStatesFrom(StateMachine<S,?,?> fsm) |
static <S,T> Map<S,Map<T,S>> |
getStatesMap() |
static <T> Set<T> |
getUnusedEventTypes() |
static <S> Set<S> |
getUnusuedStates() |
static <S,T> void |
toFile(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format,
File file)
Serialize a given state machine definition as a file.
|
static <S,T> void |
toFile(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format,
String filePath)
Serialize a given state machine definition as a file.
|
static <S,T> void |
toPath(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format,
Path filePath)
Serialize a given state machine definition as a file.
|
static <S,T> void |
toStream(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format,
OutputStream stream)
Serialize a given state machine definition to a stream.
|
static <S,T> String |
toString(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format)
Serialize a given
StateMachine definition to a String. |
static <S,T> StringBuilder |
toString(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format,
StringBuilder builder)
Serialize a given
StateMachine definition to a
StringBuilder. |
static <S,T> void |
toWriter(StateMachine<S,?,T> fsm,
StateMachines.OutputFormat format,
Writer writer)
Serialize a given state machine definition to a writer.
|
public static <S,T> String toString(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format)
StateMachine definition to a String.fsm - The state machine.format - The format to use for serialization.public static <S,T> StringBuilder toString(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format, StringBuilder builder)
StateMachine definition to a
StringBuilder.S - StateT - Event Typefsm - The state machine.format - The format to use for serialization.builder - The StringBuilder to append the serialization to.public static <S,T> void toFile(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format, String filePath)
S - StateT - Event Typefsm - The state machine.format - The format to use for serialization.filePath - The filepath where to write to.public static <S,T> void toFile(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format, File file)
S - StateT - Event Typefsm - The state machine.format - The format to use for serialization.file - The file object representing that file.public static <S,T> void toPath(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format, Path filePath)
S - StateT - Event Typefsm - The state machine.format - The format to use for serialization.filePath - The filepath where to write to.public static <S,T> void toStream(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format, OutputStream stream)
S - StateT - Event Typefsm - The state machine.format - The format to use for serialization.stream - The stream to append to.public static <S,T> void toWriter(StateMachine<S,?,T> fsm, StateMachines.OutputFormat format, Writer writer)
S - StateT - Event Typefsm - The state machine.format - The format to use for serialization.writer - The writer where to write to.public static <S> Set<S> getStatesFrom(StateMachine<S,?,?> fsm)
fsm - public static <S> Set<S> getUnusuedStates()
public static <T> Set<T> getUnusedEventTypes()
public static <T> Set<T> getEventsTypesFrom(StateMachine<?,?,T> fsm)
fsm - Copyright © 2015. All rights reserved.