Record Class CommandTree.SubCommandKey<S>
java.lang.Object
java.lang.Record
io.github.mqzn.commands.base.syntax.tree.CommandTree.SubCommandKey<S>
- Enclosing class:
- CommandTree<S>
-
Constructor Summary
ConstructorsConstructorDescriptionSubCommandKey
(String parent, String name) Creates an instance of aSubCommandKey
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> CommandTree.SubCommandKey<S>
create
(SubCommandSyntax<S> sub) static <S> CommandTree.SubCommandKey<S>
boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.parent()
Returns the value of theparent
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
SubCommandKey
Creates an instance of aSubCommandKey
record class.- Parameters:
parent
- the value for theparent
record componentname
- the value for thename
record component
-
-
Method Details
-
create
-
create
-
nextKey
-
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)
. -
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. -
parent
Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-