Package de.intarsys.tools.functor
Interface IArgs
-
- All Known Implementing Classes:
Args,ChainedArgs,DeclaredArgs,EmptyArgs
public interface IArgsThe arguments for executing anIFunctorimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARG_ARGSGeneric option for the transport of IArgs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(java.lang.Object object)voidclear()java.lang.Objectget(int index)The argument at positionindex.java.lang.Objectget(int index, java.lang.Object defaultValue)The argument at positionindexjava.lang.Objectget(java.lang.String name)The argument namedname.java.lang.Objectget(java.lang.String name, java.lang.Object defaultValue)The argument namednameor the defaultValue if not available.booleanisDefined(int index)trueif an argument atindexis defined.booleanisDefined(java.lang.String name)trueif an argument namednameis defined.booleanisIndexed()trueif this argument list is indexed.booleanisNamed()trueif this argument list is named.java.util.Set<java.lang.String>names()The set of all argument names in the argument list if this argument list is not indexed or null.voidput(int index, java.lang.Object value)voidput(java.lang.String name, java.lang.Object value)intsize()The total number of arguments.
-
-
-
Field Detail
-
ARG_ARGS
static final java.lang.String ARG_ARGS
Generic option for the transport of IArgs.- See Also:
- Constant Field Values
-
-
Method Detail
-
add
void add(java.lang.Object object)
-
clear
void clear()
-
get
java.lang.Object get(int index)
The argument at positionindex.- Parameters:
index- The index of the argument to return.- Returns:
- The argument at position
index.
-
get
java.lang.Object get(int index, java.lang.Object defaultValue)The argument at positionindex- 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
java.lang.Object get(java.lang.String name)
The argument namedname.- Parameters:
name- The name of the argument to return.- Returns:
- The argument named
name.
-
get
java.lang.Object get(java.lang.String name, java.lang.Object defaultValue)The argument namednameor 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)
trueif an argument atindexis defined.- Parameters:
index-- Returns:
trueif an argument atindexis defined.
-
isDefined
boolean isDefined(java.lang.String name)
trueif an argument namednameis defined.- Parameters:
name-- Returns:
trueif an argument namednameis defined.
-
isIndexed
boolean isIndexed()
trueif 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:
trueif this argument list is indexed.
-
isNamed
boolean isNamed()
trueif 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:
trueif this argument list is named.
-
names
java.util.Set<java.lang.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, java.lang.Object value)
-
put
void put(java.lang.String name, java.lang.Object value)
-
size
int size()
The total number of arguments.- Returns:
- The total number of arguments.
-
-