Package io.datarouter.auth.role
Record Class RoleApprovalType
java.lang.Object
java.lang.Record
io.datarouter.auth.role.RoleApprovalType
- All Implemented Interfaces:
Comparable<RoleApprovalType>
public record RoleApprovalType(String persistentString, int priority)
extends Record
implements Comparable<RoleApprovalType>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionRoleApprovalType(String persistentString, int priority) Creates an instance of aRoleApprovalTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(RoleApprovalType other) static booleanequals(RoleApprovalType first, RoleApprovalType second) booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of thepersistentStringrecord component.intpriority()Returns the value of thepriorityrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
RoleApprovalType
Creates an instance of aRoleApprovalTyperecord class.- Parameters:
persistentString- the value for thepersistentStringrecord componentpriority- the value for thepriorityrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<RoleApprovalType>
-
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
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 '=='. -
equals
-
persistentString
Returns the value of thepersistentStringrecord component.- Returns:
- the value of the
persistentStringrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-