Package org.basex.query.util.ft
Class FTMatches
AllMatches full-text container, referencing several
FTMatch instances.- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
FieldsFields inherited from class org.basex.util.list.ObjectList
listFields inherited from class org.basex.util.list.ElementList
factor, size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidand(int start, int end) Adds a match entry.booleanbooleanmatches()Checks if at least one of the matches contains only includes.protected FTMatch[]newArray(int s) Creates a resized array.voidor(int ps) Adds a match entry.voidor(int start, int end) Adds a match entry.booleanCombines two matches as phrase.voidreset(int ps) Resets the match container.Methods inherited from class org.basex.util.list.ObjectList
add, add, add, addUnique, contains, equals, finish, get, insert, iterator, next, peek, pop, push, remove, removeAll, removeAll, set, sort, toArray, toString, uniqueMethods inherited from class org.basex.util.list.ElementList
isEmpty, newCapacity, newCapacity, reset, size, sizeMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
pos
public int posPosition of a token in the query.
-
-
Constructor Details
-
FTMatches
public FTMatches()Constructor. -
FTMatches
public FTMatches(int pos) Constructor.- Parameters:
pos- query position
-
-
Method Details
-
reset
public void reset(int ps) Resets the match container.- Parameters:
ps- query position
-
or
public void or(int ps) Adds a match entry.- Parameters:
ps- position
-
or
public void or(int start, int end) Adds a match entry.- Parameters:
start- start positionend- end position
-
and
public void and(int start, int end) Adds a match entry.- Parameters:
start- start positionend- end position
-
matches
public boolean matches()Checks if at least one of the matches contains only includes.- Returns:
- result of check
-
phrase
Combines two matches as phrase.- Parameters:
all- second match listdistance- word distance- Returns:
- true if matches are left
-
newArray
Description copied from class:ObjectListCreates a resized array.- Specified by:
newArrayin classObjectList<FTMatch,FTMatches> - Parameters:
s- size- Returns:
- array
-
equals
- Overrides:
equalsin classObjectList<FTMatch,FTMatches>
-