Index.Iterator
Modifier and Type | Field and Description |
---|---|
protected jgloss.dictionary.BinarySearchIndex.BinarySearchIterator |
EMPTY_MATCH |
static int |
TYPE
Default type of this index.
|
Constructor and Description |
---|
BinarySearchIndex() |
BinarySearchIndex(int _type) |
Modifier and Type | Method and Description |
---|---|
protected int |
findMatch(Indexable dictionary,
ByteBuffer expression)
Returns the index of an index entry which matches the expression.
|
protected int |
findMatch(Indexable dictionary,
ByteBuffer expression,
int match,
boolean first)
Searches the index backwards/forwards from a matching entry to the
first/last match of an expression.
|
Index.Iterator |
getEntryPositions(Indexable dictionary,
ByteBuffer expression,
Object[] parameters)
Returns an iterator over index entries matching certain criteria.
|
int |
getType()
Returns the index type, which is used to fetch the index data from an
IndexContainer . |
void |
setContainer(IndexContainer container)
Sets the index container from which the index data is read.
|
protected final jgloss.dictionary.BinarySearchIndex.BinarySearchIterator EMPTY_MATCH
public static final int TYPE
public BinarySearchIndex()
public BinarySearchIndex(int _type)
public int getType()
Index
IndexContainer
.public void setContainer(IndexContainer container) throws IndexException
Index
getType
.setContainer
in interface Index
IndexException
public Index.Iterator getEntryPositions(Indexable dictionary, ByteBuffer expression, Object[] parameters) throws IndexException
Index
getEntryPositions
in interface Index
dictionary
- Dictionary which this Index
indexes.expression
- The search expression, encoded in a form compatible to the
dictionary
.parameters
- Additional index-dependent parameters. May be null
if the
index does not use additional search parameters.IndexException
protected int findMatch(Indexable dictionary, ByteBuffer expression) throws IndexException
-1
is returned.IndexException
protected int findMatch(Indexable dictionary, ByteBuffer expression, int match, boolean first) throws IndexException
expression
- Expression to match.match
- Offset in the index to a matching entry.first
- true
if the first matching entry should be returned,
false
if the last matching entry is returned.IndexException
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.