Package cloud.commandframework
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 java.lang.ObjectVery simple tree structure
-
-
Method Summary
Modifier and Type Method Description booleanequals(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 TgetValue()Get the node valueinthashCode()booleanisLeaf()Check if the node is a leaf nodevoidsetParent(@Nullable CommandTree.Node<@Nullable T> parent)Set the parent nodejava.lang.StringtoString()
-
-
-
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:
trueif the node is a leaf node, elsefalse
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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:
toStringin classjava.lang.Object
-
-