Package org.basex.query.util.ft
Class FTMatches
- java.lang.Object
-
- org.basex.util.list.ElementList
-
- org.basex.util.list.ObjectList<FTMatch,FTMatches>
-
- org.basex.query.util.ft.FTMatches
-
-
Field Summary
Fields Modifier and Type Field Description int
pos
Position of a token in the query.-
Fields inherited from class org.basex.util.list.ObjectList
list
-
Fields inherited from class org.basex.util.list.ElementList
factor, size
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
and(int start, int end)
Adds a match entry.boolean
equals(Object obj)
boolean
matches()
Checks if at least one of the matches contains only includes.protected FTMatch[]
newArray(int s)
Creates a resized array.void
or(int ps)
Adds a match entry.void
or(int start, int end)
Adds a match entry.boolean
phrase(FTMatches matches, int distance)
Combines two matches as phrase.void
reset(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, reverse, set, sort, toArray, toString, unique
-
Methods inherited from class org.basex.util.list.ElementList
isEmpty, newCapacity, newCapacity, reset, size, size
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
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
public boolean phrase(FTMatches matches, int distance)
Combines two matches as phrase.- Parameters:
matches
- second match listdistance
- word distance- Returns:
- true if matches are left
-
newArray
protected FTMatch[] newArray(int s)
Description copied from class:ObjectList
Creates a resized array.- Specified by:
newArray
in classObjectList<FTMatch,FTMatches>
- Parameters:
s
- size- Returns:
- array
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObjectList<FTMatch,FTMatches>
-
-