Record Class VirtualCommandDefinition
java.lang.Object
java.lang.Record
net.apartium.cocoabeans.commands.virtual.VirtualCommandDefinition
- All Implemented Interfaces:
GenericNode
@Experimental
@AvailableSince("0.0.39")
public record VirtualCommandDefinition(String name, Set<String> aliases, CommandInfo info, Set<VirtualCommandVariant> variants, Map<String,Object> metadata)
extends Record
implements GenericNode
A DTO for commands, a serializable form of commands used to send command definition between applications
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualCommandDefinition(String name, Set<String> aliases, CommandInfo info, Set<VirtualCommandVariant> variants, Map<String, Object> metadata) Create a new virtual command definition instance -
Method Summary
Modifier and TypeMethodDescriptionaliases()Returns the value of thealiasesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.variants()Returns the value of thevariantsrecord component.
-
Constructor Details
-
VirtualCommandDefinition
public VirtualCommandDefinition(String name, Set<String> aliases, CommandInfo info, Set<VirtualCommandVariant> variants, Map<String, Object> metadata) Create a new virtual command definition instance- Parameters:
name- namealiases- aliasesinfo- infovariants- variantsmetadata- metadata
-
-
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.- Returns:
- the value of the
namerecord component
-
aliases
Returns the value of thealiasesrecord component.- Returns:
- the value of the
aliasesrecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
variants
Returns the value of thevariantsrecord component.- Returns:
- the value of the
variantsrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-