Interface SimpleAutomatonDeserializer<S,I>
-
- Type Parameters:
S
- The state type of the de-serialized hypothesisI
- The default input symbol type
- All Superinterfaces:
InputModelDeserializer<I,SimpleAutomaton<S,I>>
,ModelDeserializer<InputModelData<I,SimpleAutomaton<S,I>>>
- All Known Subinterfaces:
SimpleAutomatonSerializationProvider<S,I>
- All Known Implementing Classes:
AUTSerializationProvider
public interface SimpleAutomatonDeserializer<S,I> extends InputModelDeserializer<I,SimpleAutomaton<S,I>>
A refining interface ofInputModelDeserializer
that binds the model toSimpleAutomaton
s. It also adds new functionality to read systems of arbitrary input type given a transform function from the default input type (specified by implementing class).Note: These model-specific interfaces may be omitted if Java starts supporting higher-kinded generics (or we switch to a language that supports these).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <I2> InputModelData<I2,SimpleAutomaton<S,I2>>
readModel(byte[] buf, Function<I,I2> inputTransformer)
Reads the contents from the given byte buffer and de-serializes it into aInputModelData
that contains the model and its alphabet definition.default <I2> InputModelData<I2,SimpleAutomaton<S,I2>>
readModel(File f, Function<I,I2> inputTransformer)
Reads the contents from the given file and de-serializes it into aInputModelData
that contains the model and its alphabet definition.default InputModelData<I,SimpleAutomaton<S,I>>
readModel(InputStream is)
Reads the contents from the given input stream and de-serializes it into a model instance.<I2> InputModelData<I2,SimpleAutomaton<S,I2>>
readModel(InputStream is, Function<I,I2> inputTransformer)
Reads the contents from the given input stream and de-serializes it into aInputModelData
that contains the model and its alphabet definition.default <I2> InputModelData<I2,SimpleAutomaton<S,I2>>
readModel(URL url, Function<I,I2> inputTransformer)
Reads the contents from the given URL and de-serializes it into aInputModelData
that contains the model and its alphabet definition.-
Methods inherited from interface net.automatalib.serialization.ModelDeserializer
readModel, readModel, readModel
-
-
-
-
Method Detail
-
readModel
<I2> InputModelData<I2,SimpleAutomaton<S,I2>> readModel(InputStream is, Function<I,I2> inputTransformer) throws IOException
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.
- 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 streamFormatException
- if the content of the stream was not in the expected format
-
readModel
default <I2> InputModelData<I2,SimpleAutomaton<S,I2>> readModel(URL url, Function<I,I2> inputTransformer) throws IOException
Reads the contents from the given URL and de-serializes it into aInputModelData
that contains the model and its alphabet definition.- Type Parameters:
I2
- the input symbol type of the model- Parameters:
url
- the url 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 streamFormatException
- if the content of the stream was not in the expected format
-
readModel
default <I2> InputModelData<I2,SimpleAutomaton<S,I2>> readModel(File f, Function<I,I2> inputTransformer) throws IOException
Reads the contents from the given file and de-serializes it into aInputModelData
that contains the model and its alphabet definition.- Type Parameters:
I2
- the input symbol type of the model- Parameters:
f
- the file 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 streamFormatException
- if the content of the stream was not in the expected format
-
readModel
default <I2> InputModelData<I2,SimpleAutomaton<S,I2>> readModel(byte[] buf, Function<I,I2> inputTransformer) throws IOException
Reads the contents from the given byte buffer and de-serializes it into aInputModelData
that contains the model and its alphabet definition.- Type Parameters:
I2
- the input symbol type of the model- Parameters:
buf
- the buffer 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 streamFormatException
- if the content of the stream was not in the expected format
-
readModel
default InputModelData<I,SimpleAutomaton<S,I>> readModel(InputStream is) throws IOException
Description copied from interface:ModelDeserializer
Reads the contents from the given input stream and de-serializes it into a model instance.Note: the input stream will not be closed.
- Specified by:
readModel
in interfaceModelDeserializer<S>
- Parameters:
is
- the input stream to read data from- Returns:
- the de-serialized model
- Throws:
IOException
- if an error occurred while reading from the stream
-
-