intarsys runtime library

de.intarsys.tools.functor
Interface IArgs

All Known Implementing Classes:
Args, ChainedArgs, ElementArgsAdapter, ElementChildrenArgsAdapter, PreferencesArgs

public interface IArgs

The arguments for executing an IFunctor implementation.


Nested Class Summary
static interface IArgs.IBinding
          A binding between an index or name and a value in an IArgs object.
 
Field Summary
static String ARG_ARGS
          Generic argument name for the transport of IArgs.
 
Method Summary
 IArgs.IBinding add(Object object)
          Add an indexed value.
 Iterator<IArgs.IBinding> bindings()
          An Iterator over all available bindings.
 void clear()
          Clear all bindings.
 IArgs copy()
          Create a copy.
 IArgs.IBinding declare(String name)
          Declare a name for a binding.
 Object get(int index)
          The argument at position index.
 Object get(int index, Object defaultValue)
          The argument at position index
 Object get(String name)
          The argument named name or null if not available.
 Object get(String name, Object defaultValue)
          The argument named name or the defaultValue if not available.
 boolean isDefined(String name)
          true if an argument named name is defined.
 Set<String> names()
          The set of all argument names in the argument list if this argument list is not indexed or null.
 IArgs.IBinding put(int index, Object value)
          Define an indexed binding for value.
 IArgs.IBinding put(String name, Object value)
          Define a named binding for value.
 int size()
          The total number of arguments.
 void undefine(int index)
          Undefine the binding at index.
 void undefine(String name)
          Undefine the binding for name.
 

Field Detail

ARG_ARGS

static final String ARG_ARGS
Generic argument name for the transport of IArgs.

See Also:
Constant Field Values
Method Detail

add

IArgs.IBinding add(Object object)
Add an indexed value.

Parameters:
object -

bindings

Iterator<IArgs.IBinding> bindings()
An Iterator over all available bindings.

Returns:
An Iterator over all available bindings.

clear

void clear()
Clear all bindings.


copy

IArgs copy()
Create a copy.

Returns:
The new copy.

declare

IArgs.IBinding declare(String name)
Declare a name for a binding.

Parameters:
name -
Returns:
The binding resulting from the declaration.

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 or null if not available.

Parameters:
name - The name of the argument to return.
Returns:
The argument named name or null if not available.

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(String name)
true if an argument named name is defined.

Parameters:
name -
Returns:
true if an argument named name is defined.

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

IArgs.IBinding put(int index,
                   Object value)
Define an indexed binding for value.

Parameters:
index -
value -

put

IArgs.IBinding put(String name,
                   Object value)
Define a named binding for value.

Parameters:
name -
value -

size

int size()
The total number of arguments.

Returns:
The total number of arguments.

undefine

void undefine(int index)
Undefine the binding at index.

Parameters:
index -

undefine

void undefine(String name)
Undefine the binding for name.

Parameters:
name -

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.