Class AUTSerializationProvider
- java.lang.Object
-
- net.automatalib.serialization.aut.AUTSerializationProvider
-
- All Implemented Interfaces:
SimpleAutomatonDeserializer<Integer,String>
,SimpleAutomatonSerializationProvider<Integer,String>
,SimpleAutomatonSerializer<String>
,InputModelDeserializer<String,SimpleAutomaton<Integer,String>>
,InputModelSerializer<String,SimpleAutomaton<?,String>>
,ModelDeserializer<InputModelData<String,SimpleAutomaton<Integer,String>>>
,ModelSerializer<InputModelData<String,SimpleAutomaton<?,String>>>
public final class AUTSerializationProvider extends Object implements SimpleAutomatonSerializationProvider<Integer,String>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 aInputModelData
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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.serialization.InputModelSerializer
writeModel, writeModel
-
Methods inherited from interface net.automatalib.serialization.ModelDeserializer
readModel, readModel, readModel
-
Methods inherited from interface net.automatalib.serialization.ModelSerializer
writeModel
-
Methods inherited from interface net.automatalib.serialization.automaton.SimpleAutomatonDeserializer
readModel, readModel, readModel, readModel
-
Methods inherited from interface net.automatalib.serialization.automaton.SimpleAutomatonSerializer
writeModel, writeModel
-
-
-
-
Method Detail
-
getInstance
public static AUTSerializationProvider getInstance()
-
writeModel
public <I2> void writeModel(OutputStream os, SimpleAutomaton<?,I2> model, Alphabet<I2> alphabet, Function<I2,String> inputTransformer) throws IOException
Description copied from interface:SimpleAutomatonSerializer
Writes the model to the given output stream.Note: the output stream will not be closed.
- Specified by:
writeModel
in interfaceSimpleAutomatonSerializer<String>
- Type Parameters:
I2
- the input symbol type of the model- Parameters:
os
- the output stream to write tomodel
- the model to writealphabet
- the inputs of the model to which serialization should be limitedinputTransformer
- a function to transform the inputs of the model to the inputs ofthis
serializer.- Throws:
IOException
- when writing to the output stream fails.
-
readModel
public <I2> InputModelData<I2,SimpleAutomaton<Integer,I2>> readModel(InputStream is, Function<String,I2> inputTransformer) throws IOException
Description copied from interface:SimpleAutomatonDeserializer
Reads the contents from the given input stream and de-serializes it into aInputModelData
that contains the model and its alphabet definition.Note: the input stream will not be closed.
- Specified by:
readModel
in interfaceSimpleAutomatonDeserializer<Integer,String>
- Type Parameters:
I2
- the input symbol type of the model- Parameters:
is
- the input stream to read data frominputTransformer
- a function to transform the inputs ofthis
serializer to inputs of the returned model- Returns:
InputModelData
that contains the model and its alphabet definition- Throws:
IOException
- if an error occurred while reading from the stream
-
-