Class CommandTree.Node<T>

java.lang.Object
cloud.commandframework.CommandTree.Node<T>
Type Parameters:
T - Node value type
Enclosing class:
CommandTree<C>

public static final class CommandTree.Node<T> extends Object
Very simple tree structure
  • Method Details

    • getChildren

      public @NonNull List<@NonNull CommandTree.Node<@Nullable T>> getChildren()
      Get an immutable copy of the node's child list
      Returns:
      Children
    • isLeaf

      public boolean isLeaf()
      Check if the node is a leaf node
      Returns:
      true if the node is a leaf node, else false
    • getNodeMeta

      public @NonNull Map<@NonNull String,@NonNull Object> getNodeMeta()
      Get the node meta instance
      Returns:
      Node meta
    • getValue

      public @Nullable T getValue()
      Get the node value
      Returns:
      Node value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getParent

      public @Nullable CommandTree.Node<@Nullable T> getParent()
      Get the parent node
      Returns:
      Parent node
    • setParent

      public void setParent(@Nullable CommandTree.Node<@Nullable T> parent)
      Set the parent node
      Parameters:
      parent - new parent node
    • toString

      public String toString()
      Overrides:
      toString in class Object