public final class FSABuilder extends 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 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(Iterable<byte[]> input)
Build a minimal, deterministic automaton from an iterable list of byte
sequences.
|
FSA |
complete() |
Map<FSABuilder.InfoEntry,Object> |
getInfo() |
public static final 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(Iterable<byte[]> input)
input - Input sequences to build automaton from.public Map<FSABuilder.InfoEntry,Object> getInfo()
FSABuilder.InfoEntryCopyright © 2016. All rights reserved.