Package dev.kitteh.factions.permissible
Record Class PermissibleAction.WithPrerequisite
java.lang.Object
java.lang.Record
dev.kitteh.factions.permissible.PermissibleAction.WithPrerequisite
- Record Components:
name- namedescription- descriptionshortDescription- shortDescriptionprerequisite- prerequisite
- All Implemented Interfaces:
PermissibleAction
- Enclosing interface:
PermissibleAction
public static record PermissibleAction.WithPrerequisite(String name, String description, String shortDescription, @Nullable Upgrade prerequisite)
extends Record
implements PermissibleAction
Simple little record for your convenience.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.kitteh.factions.permissible.PermissibleAction
PermissibleAction.Simple, PermissibleAction.WithPrerequisite -
Constructor Summary
ConstructorsConstructorDescriptionWithPrerequisite(String name, String description, String shortDescription, @Nullable Upgrade prerequisite) Creates an instance of aWithPrerequisiterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.@Nullable UpgradeReturns the value of theprerequisiterecord component.Returns the value of theshortDescriptionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WithPrerequisite
public WithPrerequisite(String name, String description, String shortDescription, @Nullable Upgrade prerequisite) Creates an instance of aWithPrerequisiterecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentshortDescription- the value for theshortDescriptionrecord componentprerequisite- the value for theprerequisiterecord 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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfacePermissibleAction- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfacePermissibleAction- Returns:
- the value of the
descriptionrecord component
-
shortDescription
Returns the value of theshortDescriptionrecord component.- Specified by:
shortDescriptionin interfacePermissibleAction- Returns:
- the value of the
shortDescriptionrecord component
-
prerequisite
Returns the value of theprerequisiterecord component.- Specified by:
prerequisitein interfacePermissibleAction- Returns:
- the value of the
prerequisiterecord component
-