public final class AUTSerializationProvider extends Object implements SimpleAutomatonSerializationProvider<Integer,String>
Modifier and Type | Method and Description |
---|---|
static AUTSerializationProvider |
getInstance() |
<I2> InputModelData<I2,SimpleAutomaton<Integer,I2>> |
readModel(InputStream is,
Function<String,I2> inputTransformer)
Reads the contents from the given input stream and de-serializes it into a
InputModelData that contains
the model and its alphabet definition. |
<I2> void |
writeModel(OutputStream os,
SimpleAutomaton<?,I2> model,
Alphabet<I2> alphabet,
Function<I2,String> inputTransformer)
Writes the model to the given output stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeModel, writeModel
writeModel, writeModel
writeModel
readModel, readModel, readModel, readModel
readModel, readModel, readModel
public static AUTSerializationProvider getInstance()
public <I2> void writeModel(OutputStream os, SimpleAutomaton<?,I2> model, Alphabet<I2> alphabet, Function<I2,String> inputTransformer) throws IOException
SimpleAutomatonSerializer
Note: the output stream will not be closed.
writeModel
in interface SimpleAutomatonSerializer<String>
I2
- the input symbol type of the modelos
- the output stream to write tomodel
- the model to writealphabet
- the inputs of the model to which serialization should be limitinputTransformer
- a function to transform the inputs of the model to the inputs of this
serializer.IOException
- when writing to the output stream fails.public <I2> InputModelData<I2,SimpleAutomaton<Integer,I2>> readModel(InputStream is, Function<String,I2> inputTransformer) throws IOException
SimpleAutomatonDeserializer
InputModelData
that contains
the model and its alphabet definition.
Note: the input stream will not be closed.
readModel
in interface SimpleAutomatonDeserializer<Integer,String>
I2
- the input symbol type of the modelis
- the input stream to read data frominputTransformer
- a function to transform the inputs of this
serializer to inputs of the returned modelInputModelData
that contains the model and its alphabet definitionIOException
- if an error occurred while reading from the streamCopyright © 2020. All rights reserved.