Module org.apache.lucene.core
Package org.apache.lucene.index
Record Class LogMergePolicy.SegmentInfoAndLevel
java.lang.Object
java.lang.Record
org.apache.lucene.index.LogMergePolicy.SegmentInfoAndLevel
- All Implemented Interfaces:
Comparable<LogMergePolicy.SegmentInfoAndLevel>
- Enclosing class:
LogMergePolicy
private static record LogMergePolicy.SegmentInfoAndLevel(SegmentCommitInfo info, float level)
extends Record
implements Comparable<LogMergePolicy.SegmentInfoAndLevel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SegmentCommitInfo
The field for theinfo
record component.private final float
The field for thelevel
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SegmentInfoAndLevel
(SegmentCommitInfo info, float level) Creates an instance of aSegmentInfoAndLevel
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.info()
Returns the value of theinfo
record component.float
level()
Returns the value of thelevel
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
info
The field for theinfo
record component. -
level
private final float levelThe field for thelevel
record component.
-
-
Constructor Details
-
SegmentInfoAndLevel
Creates an instance of aSegmentInfoAndLevel
record class.- Parameters:
info
- the value for theinfo
record componentlevel
- the value for thelevel
record component
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<LogMergePolicy.SegmentInfoAndLevel>
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
info
Returns the value of theinfo
record component.- Returns:
- the value of the
info
record component
-
level
public float level()Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-