Package me.croabeast.common.reflect
Class Craft.Command.Node
java.lang.Object
me.croabeast.common.reflect.Craft.Command.Node
- Enclosing class:
Craft.Command
Represents a node in the command tree.
Provides methods to retrieve child nodes, obtain the command name, add new child nodes, and remove commands.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a child node to this command node.Collection<?> Retrieves the collection of child nodes of this command node.getName()Retrieves the name of this command node.voidremoveCommand(String name) Removes a command from this node by its name.
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
getChildren
Retrieves the collection of child nodes of this command node.- Returns:
- a
Collectionof child nodes
-
getName
Retrieves the name of this command node.- Returns:
- the command node's name as a
String
-
addChild
Adds a child node to this command node.- Parameters:
node- the child node to add
-
removeCommand
Removes a command from this node by its name.- Parameters:
name- the name of the command to remove
-