Interface IArgs

All Known Implementing Classes:
Args, ChainedArgs, DeclaredArgs, EmptyArgs

public interface IArgs
The arguments for executing an IFunctor implementation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Generic option for the transport of IArgs.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Object object)
     
    void
     
    get(int index)
    The argument at position index.
    get(int index, Object defaultValue)
    The argument at position index
    get(String name)
    The argument named name.
    get(String name, Object defaultValue)
    The argument named name or the defaultValue if not available.
    boolean
    isDefined(int index)
    true if an argument at index is defined.
    boolean
    true if an argument named name is defined.
    boolean
    true if this argument list is indexed.
    boolean
    true if this argument list is named.
    The set of all argument names in the argument list if this argument list is not indexed or null.
    void
    put(int index, Object value)
     
    void
    put(String name, Object value)
     
    int
    The total number of arguments.
  • Field Details

  • Method Details

    • add

      void add(Object object)
    • clear

      void clear()
    • get

      Object get(int index)
      The argument at position index.
      Parameters:
      index - The index of the argument to return.
      Returns:
      The argument at position index.
    • get

      Object get(int index, Object defaultValue)
      The argument at position index
      Parameters:
      index - The index of the argument to return.
      defaultValue - The default value to be returned if argument is not available.
      Returns:
      The argument at position index
    • get

      Object get(String name)
      The argument named name.
      Parameters:
      name - The name of the argument to return.
      Returns:
      The argument named name .
    • get

      Object get(String name, Object defaultValue)
      The argument named name or the defaultValue if not available.
      Parameters:
      name - The name of the argument to return.
      defaultValue - The default value to be returned if argument is not available.
      Returns:
      The argument named name
    • isDefined

      boolean isDefined(int index)
      true if an argument at index is defined.
      Parameters:
      index -
      Returns:
      true if an argument at index is defined.
    • isDefined

      boolean isDefined(String name)
      true if an argument named name is defined.
      Parameters:
      name -
      Returns:
      true if an argument named name is defined.
    • isIndexed

      boolean isIndexed()
      true if this argument list is indexed. This means its elements are available via integer indexes.

      This does NOT mean the arguments are not available via names - there are implementations that can support both.

      Returns:
      true if this argument list is indexed.
    • isNamed

      boolean isNamed()
      true if this argument list is named. This means its elements are available via names.

      This does NOT mean the arguments are not available via indexes - there are implementations that can support both.

      Returns:
      true if this argument list is named.
    • names

      Set<String> names()
      The set of all argument names in the argument list if this argument list is not indexed or null.
      Returns:
      The set of all argument names in the argument list if this argument list is not indexed or null.
    • put

      void put(int index, Object value)
    • put

      void put(String name, Object value)
    • size

      int size()
      The total number of arguments.
      Returns:
      The total number of arguments.