Class ListArgumentBag

java.lang.Object
be.seeseemelk.llamascript.arguments.ListArgumentBag
All Implemented Interfaces:
ArgumentBag

public class ListArgumentBag extends Object implements ArgumentBag
A bag of arguments that will keep the order in which the arguments were added. The arguments are added with an index, which starts at one for the first argument.
  • Constructor Details

    • ListArgumentBag

      public ListArgumentBag()
  • Method Details

    • add

      public ListArgumentBag add(Object value)
      Adds an argument to the bag.
      Parameters:
      value - The argument to add.
      Returns:
      This instance.
    • writeTo

      public void writeTo(StringBuilder builder)
      Description copied from interface: ArgumentBag
      Writes the values inside the argument bag to a StringBuilder.
      Specified by:
      writeTo in interface ArgumentBag
      Parameters:
      builder - The StringBuilder to write to.
    • of

      public static ListArgumentBag of(Object... values)
      Creates an argument bag from an array of values.
      Parameters:
      values - The values to add.
      Returns:
      The bag with the arguments added.