Package ru.slie.luna.issue.rank
Record Class LexoRank
java.lang.Object
java.lang.Record
ru.slie.luna.issue.rank.LexoRank
- All Implemented Interfaces:
Comparable<LexoRank>
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.static voidnext()prev()rank()Returns the value of therankrecord component.@NonNull StringtoString()Returns a string representation of this record class.
-
Field Details
-
FIRST_VALUE
-
-
Constructor Details
-
LexoRank
Creates an instance of aLexoRankrecord class.- Parameters:
rank- the value for therankrecord component
-
-
Method Details
-
between
-
next
-
prev
- Throws:
RankNoSpaceLeftException
-
compareTo
- Specified by:
compareToin interfaceComparable<LexoRank>
-
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. -
main
- Throws:
RankNoSpaceLeftException
-
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). -
rank
Returns the value of therankrecord component.- Returns:
- the value of the
rankrecord component
-