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.DisjunctionIntervalIterator
The field for theit
record component.private final List
<IntervalMatchesIterator> The field for thesubs
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
DisjunctionMatchesIterator
(DisjunctionIntervalsSource.DisjunctionIntervalIterator it, List<IntervalMatchesIterator> subs) Creates an instance of aDisjunctionMatchesIterator
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
The ending offset of the current match, or-1
if offsets are not availableint
The end position of the current match, or-1
if positions are not availablefinal boolean
Indicates whether some other object is "equal to" this one.int
gaps()
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 int
hashCode()
Returns a hash code value for this object.it()
Returns the value of theit
record component.boolean
next()
Advance the iterator to the next match positionint
The starting offset of the current match, or-1
if offsets are not availableint
The start position of the current match, or-1
if positions are not availablesubs()
Returns the value of thesubs
record component.final String
toString()
Returns a string representation of this record class.int
width()
The width of the current match
-
Field Details
-
it
The field for theit
record component. -
subs
The field for thesubs
record component.
-
-
Constructor Details
-
DisjunctionMatchesIterator
private DisjunctionMatchesIterator(DisjunctionIntervalsSource.DisjunctionIntervalIterator it, List<IntervalMatchesIterator> subs) Creates an instance of aDisjunctionMatchesIterator
record class.- Parameters:
it
- the value for theit
record componentsubs
- the value for thesubs
record component
-
-
Method Details
-
next
Description copied from interface:MatchesIterator
Advance the iterator to the next match position- Specified by:
next
in interfaceMatchesIterator
- Returns:
true
if matches have not been exhausted- Throws:
IOException
-
startPosition
public int startPosition()Description copied from interface:MatchesIterator
The start position of the current match, or-1
if positions are not availableShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
startPosition
in interfaceMatchesIterator
-
endPosition
public int endPosition()Description copied from interface:MatchesIterator
The end position of the current match, or-1
if positions are not availableShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
endPosition
in interfaceMatchesIterator
-
startOffset
Description copied from interface:MatchesIterator
The starting offset of the current match, or-1
if offsets are not availableShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
startOffset
in interfaceMatchesIterator
- Throws:
IOException
-
endOffset
Description copied from interface:MatchesIterator
The ending offset of the current match, or-1
if offsets are not availableShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
endOffset
in interfaceMatchesIterator
- Throws:
IOException
-
getSubMatches
Description copied from interface:MatchesIterator
Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current matchReturns
null
if there are no submatches (ie the current iterator is at the leaf level)Should only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
getSubMatches
in interfaceMatchesIterator
- Throws:
IOException
-
getQuery
Description copied from interface:MatchesIterator
Returns the Query causing the current matchIf this
MatchesIterator
has been returned from aMatchesIterator.getSubMatches()
call, then returns aTermQuery
equivalent to the current matchShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
getQuery
in interfaceMatchesIterator
-
gaps
public int gaps()Description copied from interface:IntervalMatchesIterator
The number of top-level gaps inside the current match- Specified by:
gaps
in interfaceIntervalMatchesIterator
- See Also:
-
width
public int width()Description copied from interface:IntervalMatchesIterator
The width of the current match- Specified by:
width
in 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 theit
record component.- Returns:
- the value of the
it
record component
-
subs
Returns the value of thesubs
record component.- Returns:
- the value of the
subs
record component
-