public final class FSABuilder
extends java.lang.Object
FSA that is a tradeoff between construction speed and
memory consumption. Use serializers to compress the returned automaton into
more compact form.FSASerializer| Modifier and Type | Class and Description |
|---|---|
static class |
FSABuilder.InfoEntry
Debug and information constants.
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<byte[]> |
LEXICAL_ORDERING
A comparator comparing full byte arrays.
|
| Constructor and Description |
|---|
FSABuilder() |
FSABuilder(int bufferGrowthSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] sequence,
int start,
int len)
Add a single sequence of bytes to the FSA.
|
static FSA |
build(byte[][] input)
Build a minimal, deterministic automaton from a sorted list of byte
sequences.
|
static FSA |
build(java.lang.Iterable<byte[]> input)
Build a minimal, deterministic automaton from an iterable list of byte
sequences.
|
FSA |
complete() |
java.util.Map<FSABuilder.InfoEntry,java.lang.Object> |
getInfo() |
public static final java.util.Comparator<byte[]> LEXICAL_ORDERING
public FSABuilder()
public FSABuilder(int bufferGrowthSize)
bufferGrowthSize - Buffer growth size (in bytes) when constructing the automaton.public void add(byte[] sequence,
int start,
int len)
sequence - The array holding input sequence of bytes.start - Starting offset (inclusive)len - Length of the input sequence (at least 1 byte).public FSA complete()
public static FSA build(byte[][] input)
input - Input sequences to build automaton from.public static FSA build(java.lang.Iterable<byte[]> input)
input - Input sequences to build automaton from.public java.util.Map<FSABuilder.InfoEntry,java.lang.Object> getInfo()
FSABuilder.InfoEntryCopyright © 2025. All rights reserved.