Class CommandTree.Node<T>

  • Type Parameters:
    T - Node value type
    Enclosing class:
    CommandTree<C>

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

      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      @NonNull java.util.List<@NonNull CommandTree.Node<@Nullable T>> getChildren()
      Get an immutable copy of the node's child list
      @NonNull java.util.Map<@NonNull java.lang.String,​@NonNull java.lang.Object> getNodeMeta()
      Get the node meta instance
      @Nullable CommandTree.Node<@Nullable T> getParent()
      Get the parent node
      @Nullable T getValue()
      Get the node value
      int hashCode()  
      boolean isLeaf()
      Check if the node is a leaf node
      void setParent​(@Nullable CommandTree.Node<@Nullable T> parent)
      Set the parent node
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getChildren

        public @NonNull java.util.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 java.util.Map<@NonNull java.lang.String,​@NonNull java.lang.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object