Record Class PunishmentCurrentUserCache.UserTypeKey
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.punishment.user.PunishmentCurrentUserCache.UserTypeKey
- Enclosing class:
PunishmentCurrentUserCache
protected static record PunishmentCurrentUserCache.UserTypeKey(int userId, int typeId)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUserTypeKey(int userId, int typeId) Creates an instance of aUserTypeKeyrecord 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.final StringtoString()Returns a string representation of this record class.inttypeId()Returns the value of thetypeIdrecord component.intuserId()Returns the value of theuserIdrecord component.
-
Field Details
-
userId
private final int userIdThe field for theuserIdrecord component. -
typeId
private final int typeIdThe field for thetypeIdrecord component.
-
-
Constructor Details
-
UserTypeKey
protected UserTypeKey(int userId, int typeId) Creates an instance of aUserTypeKeyrecord class.- Parameters:
userId- the value for theuserIdrecord componenttypeId- the value for thetypeIdrecord 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. All components in this record class are compared with '=='. -
userId
public int userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
typeId
public int typeId()Returns the value of thetypeIdrecord component.- Returns:
- the value of the
typeIdrecord component
-