Class VarList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess

public class VarList extends ArrayList<Object>
Simple list of variables that can consist of either variable classes or instances.
See Also:
  • Constructor Details

    • VarList

      protected VarList()
      Constructor.
    • VarList

      protected VarList(VarList copyFrom)
      Copy constructor.
      Parameters:
      copyFrom - The list to copy. Must not be null.
  • Method Details

    • create

      public static VarList create()
      Returns an empty list of variables.
      Returns:
      A new empty list of variables.
    • of

      @SafeVarargs public static final VarList of(Class<? extends Var>... vars)
      Creates a new list of variables.
      Parameters:
      vars - The variables to create.
      Returns:
      A new list of variables.
    • of

      public static VarList of(Var... vars)
      Creates a new list of variables.
      Parameters:
      vars - The variables to create.
      Returns:
      A new list of variables.
    • addDefault

      public VarList addDefault()
      Adds the default variables to this list.

      The default variables are:

      The 11 transformation/conditional Vars that previously lived here (SwitchVar, IfVar, CoalesceVar, PatternMatchVar, PatternReplaceVar, PatternExtractVar, UpperCaseVar, LowerCaseVar, NotEmptyVar, LenVar, SubstringVar) were deleted in 10.0.0 and replaced by the #{...} script syntax. The built-in VarFunction catalog is registered separately via VarResolver.Builder.defaultFunctions().

      Returns:
      This object.
    • append

      @SafeVarargs public final VarList append(Class<? extends Var>... vars)
      Adds a list of variables to this list.
      Parameters:
      vars - The variables to append to this list.
      Returns:
      This object.
    • append

      public VarList append(Var... vars)
      Adds a list of variables to this list.
      Parameters:
      vars - The variables to append to this list.
      Returns:
      This object.
    • append

      public VarList append(VarList vars)
      Adds a list of variables to this list.
      Parameters:
      vars - The variables to append to this list. Must not be null.
      Returns:
      This object.
    • copy

      public VarList copy()
      Makes a copy of this list.
      Returns:
      A new copy of this list.