public class CompiledAutomaton extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CompiledAutomaton.AUTOMATON_TYPE
Automata are compiled into different internal forms for the
most efficient execution depending upon the language they accept.
|
Modifier and Type | Field and Description |
---|---|
Automaton |
automaton
Two dimensional array of transitions, indexed by state
number for traversal.
|
BytesRef |
commonSuffixRef
Shared common suffix accepted by the automaton.
|
Boolean |
finite
Indicates if the automaton accepts a finite set of strings.
|
ByteRunAutomaton |
runAutomaton
Matcher for quickly determining if a byte[] is accepted.
|
BytesRef |
term
For
CompiledAutomaton.AUTOMATON_TYPE.PREFIX , this is the prefix term;
for CompiledAutomaton.AUTOMATON_TYPE.SINGLE this is the singleton term. |
CompiledAutomaton.AUTOMATON_TYPE |
type
If simplify is true this will be the "simplified" type; else, this is NORMAL
|
Constructor and Description |
---|
CompiledAutomaton(Automaton automaton)
Create this, passing simplify=true and finite=null, so that we try
to simplify the automaton and determine if it is finite.
|
CompiledAutomaton(Automaton automaton,
Boolean finite,
boolean simplify)
Create this.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
BytesRef |
floor(BytesRef input,
BytesRefBuilder output)
Finds largest term accepted by this Automaton, that's
<= the provided input term.
|
TermsEnum |
getTermsEnum(Terms terms)
|
int |
hashCode() |
public final CompiledAutomaton.AUTOMATON_TYPE type
public final BytesRef term
CompiledAutomaton.AUTOMATON_TYPE.PREFIX
, this is the prefix term;
for CompiledAutomaton.AUTOMATON_TYPE.SINGLE
this is the singleton term.public final ByteRunAutomaton runAutomaton
CompiledAutomaton.AUTOMATON_TYPE.NORMAL
.public final Automaton automaton
runAutomaton
.
Only valid for CompiledAutomaton.AUTOMATON_TYPE.NORMAL
.public final BytesRef commonSuffixRef
CompiledAutomaton.AUTOMATON_TYPE.NORMAL
, and only when the
automaton accepts an infinite language.public final Boolean finite
CompiledAutomaton.AUTOMATON_TYPE.NORMAL
.public CompiledAutomaton(Automaton automaton)
public CompiledAutomaton(Automaton automaton, Boolean finite, boolean simplify)
Operations.isFinite(org.apache.lucene.util.automaton.Automaton)
to determine whether it is finite. If simplify is true, we run
possibly expensive operations to determine if the automaton is one
the cases in CompiledAutomaton.AUTOMATON_TYPE
.public TermsEnum getTermsEnum(Terms terms) throws IOException
IOException
public BytesRef floor(BytesRef input, BytesRefBuilder output)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.