Interface SimpleAutomatonSerializer<I>

    • Method Detail

      • writeModel

        <I2> void writeModel​(OutputStream os,
                             SimpleAutomaton<?,​I2> model,
                             Alphabet<I2> alphabet,
                             Function<I2,​I> inputTransformer)
                      throws IOException
        Writes the model to the given output stream.

        Note: the output stream will not be closed.

        Type Parameters:
        I2 - the input symbol type of the model
        Parameters:
        os - the output stream to write to
        model - the model to write
        alphabet - the inputs of the model to which serialization should be limited
        inputTransformer - a function to transform the inputs of the model to the inputs of this serializer.
        Throws:
        IOException - when writing to the output stream fails.
      • writeModel

        default <I2> void writeModel​(File f,
                                     SimpleAutomaton<?,​I2> model,
                                     Alphabet<I2> alphabet,
                                     Function<I2,​I> inputTransformer)
                              throws IOException
        Writes the model to the given file.
        Type Parameters:
        I2 - the input symbol type of the model
        Parameters:
        f - the file to write to
        model - the model to write
        alphabet - the inputs of the model to which serialization should be limited
        inputTransformer - a function to transform the inputs of the model to the inputs of this serializer.
        Throws:
        IOException - when writing to the output stream fails.