Package dev.kitteh.factions.permissible
Record Class PermissibleAction.Simple
java.lang.Object
java.lang.Record
dev.kitteh.factions.permissible.PermissibleAction.Simple
- Record Components:
name- namedescription- descriptionshortDescription- shortDescription
- All Implemented Interfaces:
PermissibleAction
- Enclosing interface:
PermissibleAction
public static record PermissibleAction.Simple(String name, String description, String shortDescription)
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
Constructors -
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 UpgradePrerequisite for this permissible action to appear to users, if present.Returns the value of theshortDescriptionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Simple
Creates an instance of aSimplerecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentshortDescription- the value for theshortDescriptionrecord component
-
-
Method Details
-
prerequisite
Description copied from interface:PermissibleActionPrerequisite for this permissible action to appear to users, if present.- Specified by:
prerequisitein interfacePermissibleAction- Returns:
- prerequisite or null if not present
-
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
-