public final class CFSA2Serializer extends Object implements FSASerializer
FSA graphs to CFSA2.
It is possible to serialize the automaton with numbers required for perfect
hashing. See withNumbers() method.
CFSA2| Constructor and Description |
|---|
CFSA2Serializer() |
| Modifier and Type | Method and Description |
|---|---|
Set<FSAFlags> |
getFlags()
Return supported flags.
|
<T extends OutputStream> |
serialize(FSA fsa,
T os)
|
CFSA2Serializer |
withAnnotationSeparator(byte annotationSeparator)
Sets the annotation separator (only if
FSASerializer.getFlags() returns
FSAFlags.SEPARATORS). |
CFSA2Serializer |
withFiller(byte filler)
Sets the filler separator (only if
FSASerializer.getFlags() returns
FSAFlags.SEPARATORS). |
CFSA2Serializer |
withNumbers()
Serialize the automaton with the number of right-language sequences in each
node.
|
public CFSA2Serializer withNumbers()
withNumbers in interface FSASerializerpublic <T extends OutputStream> T serialize(FSA fsa, T os) throws IOException
serialize in interface FSASerializerT - A subclass of OutputStream, returned for chaining.fsa - The automaton to serialize.os - The output stream to serialize to.os for chaining.IOException - Rethrown if an I/O error occurs.withNumbers()public Set<FSAFlags> getFlags()
getFlags in interface FSASerializerpublic CFSA2Serializer withFiller(byte filler)
FSASerializerFSASerializer.getFlags() returns
FSAFlags.SEPARATORS).withFiller in interface FSASerializerfiller - The filler separator byte.this for call chaining.public CFSA2Serializer withAnnotationSeparator(byte annotationSeparator)
FSASerializerFSASerializer.getFlags() returns
FSAFlags.SEPARATORS).withAnnotationSeparator in interface FSASerializerannotationSeparator - The filler separator byte.this for call chaining.Copyright © 2016. All rights reserved.