Package com.enhancedechest.service
Record Class PermissionChestService.PermTargets
java.lang.Object
java.lang.Record
com.enhancedechest.service.PermissionChestService.PermTargets
- Enclosing class:
PermissionChestService
public static record PermissionChestService.PermTargets(Map<Integer,Integer> desired, int defaultTarget)
extends Record
Both permission-derived targets, resolved together: the PERM-chest target as
size → count
and the base-chest size override (the largest valid default_size permission held, or
0 for none). Neither has a config toggle: both are driven purely by permissions.-
Constructor Summary
ConstructorsConstructorDescriptionPermTargets(Map<Integer, Integer> desired, int defaultTarget) Creates an instance of aPermTargetsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedefaultTargetrecord component.desired()Returns the value of thedesiredrecord component.final 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.
-
Constructor Details
-
PermTargets
Creates an instance of aPermTargetsrecord class.- Parameters:
desired- the value for thedesiredrecord componentdefaultTarget- the value for thedefaultTargetrecord 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 '=='. -
desired
Returns the value of thedesiredrecord component.- Returns:
- the value of the
desiredrecord component
-
defaultTarget
public int defaultTarget()Returns the value of thedefaultTargetrecord component.- Returns:
- the value of the
defaultTargetrecord component
-