Record Class UserPermissionCache.PermissionKey
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.user.permission.UserPermissionCache.PermissionKey
- Enclosing class:
UserPermissionCache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thepermissionrecord component.private final intThe field for theuserIdrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPermissionKey(int userId, String permission) Creates an instance of aPermissionKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepermissionrecord component.final StringtoString()Returns a string representation of this record class.intuserId()Returns the value of theuserIdrecord component.
-
Field Details
-
userId
private final int userIdThe field for theuserIdrecord component. -
permission
The field for thepermissionrecord component.
-
-
Constructor Details
-
PermissionKey
Creates an instance of aPermissionKeyrecord class.- Parameters:
userId- the value for theuserIdrecord componentpermission- the value for thepermissionrecord component
-
-
Method Details
-
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 '=='. -
userId
public int userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-