Class MutableCommandPath

java.lang.Object
revxrsal.commands.core.CommandPath
revxrsal.commands.core.MutableCommandPath
All Implemented Interfaces:
Comparable<CommandPath>, Iterable<String>

public class MutableCommandPath extends CommandPath
  • Constructor Details

    • MutableCommandPath

      public MutableCommandPath(String[] path)
    • MutableCommandPath

      public MutableCommandPath(ArgumentStack argumentStack)
  • Method Details

    • empty

      @NotNull public static @NotNull MutableCommandPath empty()
    • removeFirst

      public String removeFirst()
    • removeLast

      public String removeLast()
    • addFirst

      public void addFirst(String s)
    • addLast

      public void addLast(String s)
    • contains

      public boolean contains(Object o)
    • add

      public boolean add(String s)
    • clear

      public void clear()
    • add

      public void add(int index, String element)
    • peek

      public String peek()
    • poll

      public String poll()
    • push

      public void push(String s)
    • pop

      public String pop()
    • toImmutablePath

      public CommandPath toImmutablePath()
    • iterator

      @NotNull public @NotNull Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
      Overrides:
      iterator in class CommandPath
    • isMutable

      public boolean isMutable()
      Description copied from class: CommandPath
      Returns whether is this command path mutable or not.

      This should only return true in cases of MutableCommandPath.

      Overrides:
      isMutable in class CommandPath
      Returns:
      Whether is the path mutable or not.