Module org.apache.lucene.queries
Record Class DisjunctionIntervalsSource.DisjunctionMatchesIterator
java.lang.Object
java.lang.Record
org.apache.lucene.queries.intervals.DisjunctionIntervalsSource.DisjunctionMatchesIterator
- All Implemented Interfaces:
IntervalMatchesIterator,MatchesIterator
- Enclosing class:
DisjunctionIntervalsSource
private static record DisjunctionIntervalsSource.DisjunctionMatchesIterator(DisjunctionIntervalsSource.DisjunctionIntervalIterator it, List<IntervalMatchesIterator> subs)
extends Record
implements IntervalMatchesIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DisjunctionIntervalsSource.DisjunctionIntervalIteratorThe field for theitrecord component.private final List<IntervalMatchesIterator> The field for thesubsrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDisjunctionMatchesIterator(DisjunctionIntervalsSource.DisjunctionIntervalIterator it, List<IntervalMatchesIterator> subs) Creates an instance of aDisjunctionMatchesIteratorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintThe ending offset of the current match, or-1if offsets are not availableintThe end position of the current match, or-1if positions are not availablefinal booleanIndicates whether some other object is "equal to" this one.intgaps()The number of top-level gaps inside the current matchgetQuery()Returns the Query causing the current matchReturns a MatchesIterator that iterates over the positions and offsets of individual terms within the current matchfinal inthashCode()Returns a hash code value for this object.it()Returns the value of theitrecord component.booleannext()Advance the iterator to the next match positionintThe starting offset of the current match, or-1if offsets are not availableintThe start position of the current match, or-1if positions are not availablesubs()Returns the value of thesubsrecord component.final StringtoString()Returns a string representation of this record class.intwidth()The width of the current match
-
Field Details
-
it
The field for theitrecord component. -
subs
The field for thesubsrecord component.
-
-
Constructor Details
-
DisjunctionMatchesIterator
private DisjunctionMatchesIterator(DisjunctionIntervalsSource.DisjunctionIntervalIterator it, List<IntervalMatchesIterator> subs) Creates an instance of aDisjunctionMatchesIteratorrecord class.- Parameters:
it- the value for theitrecord componentsubs- the value for thesubsrecord component
-
-
Method Details
-
next
Description copied from interface:MatchesIteratorAdvance the iterator to the next match position- Specified by:
nextin interfaceMatchesIterator- Returns:
trueif matches have not been exhausted- Throws:
IOException
-
startPosition
public int startPosition()Description copied from interface:MatchesIteratorThe start position of the current match, or-1if positions are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
startPositionin interfaceMatchesIterator
-
endPosition
public int endPosition()Description copied from interface:MatchesIteratorThe end position of the current match, or-1if positions are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
endPositionin interfaceMatchesIterator
-
startOffset
Description copied from interface:MatchesIteratorThe starting offset of the current match, or-1if offsets are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
startOffsetin interfaceMatchesIterator- Throws:
IOException
-
endOffset
Description copied from interface:MatchesIteratorThe ending offset of the current match, or-1if offsets are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
endOffsetin interfaceMatchesIterator- Throws:
IOException
-
getSubMatches
Description copied from interface:MatchesIteratorReturns a MatchesIterator that iterates over the positions and offsets of individual terms within the current matchReturns
nullif there are no submatches (ie the current iterator is at the leaf level)Should only be called after
MatchesIterator.next()has returnedtrue- Specified by:
getSubMatchesin interfaceMatchesIterator- Throws:
IOException
-
getQuery
Description copied from interface:MatchesIteratorReturns the Query causing the current matchIf this
MatchesIteratorhas been returned from aMatchesIterator.getSubMatches()call, then returns aTermQueryequivalent to the current matchShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
getQueryin interfaceMatchesIterator
-
gaps
public int gaps()Description copied from interface:IntervalMatchesIteratorThe number of top-level gaps inside the current match- Specified by:
gapsin interfaceIntervalMatchesIterator- See Also:
-
width
public int width()Description copied from interface:IntervalMatchesIteratorThe width of the current match- Specified by:
widthin interfaceIntervalMatchesIterator- See Also:
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
it
Returns the value of theitrecord component.- Returns:
- the value of the
itrecord component
-
subs
Returns the value of thesubsrecord component.- Returns:
- the value of the
subsrecord component
-