Package net.apartium.cocoabeans.commands
Record Class CommandInfo
java.lang.Object
java.lang.Record
net.apartium.cocoabeans.commands.CommandInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandInfocreateFromAnnotations(Collection<Annotation[]> collection) Returns the value of thedescriptionsrecord component.booleanIndicates whether some other object is "equal to" this one.Get the first descriptionGet all descriptionsGet the first long descriptionGet all long descriptionsgetUsage()Get the first usageGet all usagesinthashCode()Returns a hash code value for this object.Returns the value of thelongDescriptionsrecord component.merge(CommandInfo other) final StringtoString()Returns a string representation of this record class.usages()Returns the value of theusagesrecord component.
-
Constructor Details
-
CommandInfo
public CommandInfo(List<String> descriptions, List<String> usages, List<List<String>> longDescriptions) Creates an instance of aCommandInforecord class.- Parameters:
descriptions- the value for thedescriptionsrecord componentusages- the value for theusagesrecord componentlongDescriptions- the value for thelongDescriptionsrecord component
-
-
Method Details
-
getDescription
Get the first description- Returns:
- the first description
-
getUsage
Get the first usage- Returns:
- the first usage
-
getLongDescription
Get the first long description- Returns:
- the first long description
-
getDescriptions
Get all descriptions- Returns:
- all descriptions
-
getUsages
Get all usages- Returns:
- all usages
-
getLongDescriptions
Get all long descriptions- Returns:
- all long descriptions
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
createFromAnnotations
-
merge
-
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. -
descriptions
Returns the value of thedescriptionsrecord component.- Returns:
- the value of the
descriptionsrecord component
-
usages
Returns the value of theusagesrecord component.- Returns:
- the value of the
usagesrecord component
-
longDescriptions
Returns the value of thelongDescriptionsrecord component.- Returns:
- the value of the
longDescriptionsrecord component
-