Argument extends ArgumentCommandNode<T, V> implements Mutable<T> { @Override public void addChild(CommandNode<T> child) { Nodes.addChild(this, child, addition); } Argument(String name, ArgumentType<V> type, Command<T> command, Predicate<T> requirement, SuggestionProvider<T> suggestions);  Argument(String name, ArgumentType<V> type, Execution<T> execution, Predicate<T> requirement, SuggestionProvider<T> suggestions);  Argument(String name, ArgumentType<V> type, Command<T> command, Predicate<T> requirement, @Nullable CommandNode<T> destination, RedirectModifier<T> modifier, boolean fork, SuggestionProvider<T> suggestions); static Builder<T, V> builder(String name, ArgumentType<V> type); static Builder<CommandSender, V> of(String name, ArgumentType<V> type); @Override void addChild(CommandNode<T> child); @Override CommandNode<T> removeChild(String child); @Override void setCommand(Command<T> command); @Override @Nullable CommandNode<T> getRedirect(); @Override void setRedirect(CommandNode<T> destination);  }
@Test void addChild_extensive_child() { argument.addChild(extensive); argument.addChild(child); assertEquals(1, argument.getChildren().size()); var child = (Argument<String, String>) argument.getChild("child"); assertSame(this.child, child); assertEquals(2, child.getChildren().size()); }
@Test void addChild_literal() { argument.addChild(literal); assertEquals(2, argument.getChildren().size()); assertSame(this.literal, argument.getChild("child")); }
@Test void addChild_literal_extensive() { argument.addChild(literal); argument.addChild(extensive); assertEquals(3, argument.getChildren().size()); assertSame(extensive, argument.getChild("child")); assertEquals(2, extensive.getChildren().size()); }
@Test void addChild_literal_argument() { argument.addChild(extensive); argument.addChild(literal); assertEquals(2, argument.getChildren().size()); assertSame(literal, argument.getChild("child")); assertEquals(2, extensive.getChildren().size()); }
@Test void addChild_child() { argument.addChild(child); assertEquals(1, argument.getChildren().size()); assertSame(this.child, argument.getChild("child")); }
@Test void addChild_child_extensive() { argument.addChild(child); argument.addChild(extensive); assertEquals(3, argument.getChildren().size()); var child = (Literal<String>) argument.getChild("child"); assertSame(this.extensive, child); assertEquals(2, child.getChildren().size()); assertEquals(2, child.aliases().size()); assertEquals(2, child.aliases().get(0).getChildren().size()); assertTrue(((Aliasable<String>) child.aliases().get(0)).aliases().isEmpty()); }