Interface FSTSerializer
-
- All Known Implementing Classes:
FSTSerializerImpl
public interface FSTSerializerAll FST serializers (to binary formats) will implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<FSTFlags>getFlags()<T extends OutputStream>
Tserialize(FST fst, T os)Serialize a finite state automaton to an output stream.FSTSerializerwithNumbers()Enables support for right language count on nodes, speeding up perfect hash counts (only ifgetFlags()returnsFSTFlags.NUMBERS).
-
-
-
Method Detail
-
serialize
<T extends OutputStream> T serialize(FST fst, T os) throws IOException
Serialize a finite state automaton to an output stream.- Type Parameters:
T- A subclass ofOutputStream, returned for chaining.- Parameters:
fst- The automaton to serialize.os- The output stream to serialize to.- Returns:
- Returns
Tfor chaining. - Throws:
IOException- Rethrown if an I/O error occurs.
-
getFlags
Set<FSTFlags> getFlags()
- Returns:
- Returns the set of flags supported by the serializer (and the output automaton).
-
withNumbers
FSTSerializer withNumbers()
Enables support for right language count on nodes, speeding up perfect hash counts (only ifgetFlags()returnsFSTFlags.NUMBERS).- Returns:
- Returns
thisfor call chaining.
-
-