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 SegmentCommitInfoThe field for theinforecord component.private final floatThe field for thelevelrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSegmentInfoAndLevel(SegmentCommitInfo info, float level) Creates an instance of aSegmentInfoAndLevelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.floatlevel()Returns the value of thelevelrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
info
The field for theinforecord component. -
level
private final float levelThe field for thelevelrecord component.
-
-
Constructor Details
-
SegmentInfoAndLevel
Creates an instance of aSegmentInfoAndLevelrecord class.- Parameters:
info- the value for theinforecord componentlevel- the value for thelevelrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin 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 theinforecord component.- Returns:
- the value of the
inforecord component
-
level
public float level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-