Class ResolvedSubCommandNode

java.lang.Object
dev.ua.theroer.magicutils.commands.ResolvedSubCommandNode

public final class ResolvedSubCommandNode extends Object
Public immutable view of the resolved subcommand tree.
  • Constructor Details

    • ResolvedSubCommandNode

      public ResolvedSubCommandNode(String name, List<String> aliases, List<ResolvedSubCommandNode> children, ResolvedCommandAction action)
      Creates a new resolved subcommand node.
      Parameters:
      name - subcommand name
      aliases - subcommand aliases
      children - list of child subcommand nodes
      action - executable action for this node (can be null)
  • Method Details

    • root

      public static ResolvedSubCommandNode root()
      Returns an empty root node.
      Returns:
      empty root
    • name

      public String name()
      Returns the subcommand name.
      Returns:
      subcommand name
    • aliases

      public List<String> aliases()
      Returns the subcommand aliases.
      Returns:
      list of aliases
    • children

      public List<ResolvedSubCommandNode> children()
      Returns the child subcommand nodes.
      Returns:
      child nodes
    • action

      public ResolvedCommandAction action()
      Returns the executable action for this node.
      Returns:
      executable action or null