Package de.intarsys.tools.functor
Class ChainedArgs
java.lang.Object
de.intarsys.tools.functor.ChainedArgs
- All Implemented Interfaces:
IArgs
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionChainedArgs(IArgs args, IArgs fallbackArgs) Create newChainedArgswhereargsare always looked up first. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()get(int index) The argument at positionindex.The argument at positionindexThe argument namedname.The argument namednameor the defaultValue if not available.getArgs()The main (primary)IArgs.The fallback (secondary)IArgs;booleanisDefined(int index) trueif an argument atindexis defined.booleantrueif an argument namednameis defined.booleantrueif this argument list is indexed.booleanisNamed()trueif this argument list is named.names()The set of all argument names in the argument list if this argument list is not indexed or null.voidvoidintsize()The total number of arguments.toString()
-
Constructor Details
-
ChainedArgs
Create newChainedArgswhereargsare always looked up first. If lookup fails,fallbackArgsare used.
-
-
Method Details
-
add
-
clear
public void clear() -
get
Description copied from interface:IArgsThe argument at positionindex. -
get
Description copied from interface:IArgsThe argument at positionindex -
get
Description copied from interface:IArgsThe argument namedname. -
get
Description copied from interface:IArgsThe argument namednameor the defaultValue if not available. -
getArgs
The main (primary)IArgs.- Returns:
- The main (primary)
IArgs.
-
getFallbackArgs
The fallback (secondary)IArgs;- Returns:
- The fallback (secondary)
IArgs;
-
isDefined
public boolean isDefined(int index) Description copied from interface:IArgstrueif an argument atindexis defined. -
isDefined
Description copied from interface:IArgstrueif an argument namednameis defined. -
isIndexed
public boolean isIndexed()Description copied from interface:IArgstrueif 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.
-
isNamed
public boolean isNamed()Description copied from interface:IArgstrueif 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.
-
names
Description copied from interface:IArgsThe set of all argument names in the argument list if this argument list is not indexed or null. -
put
-
put
-
size
public int size()Description copied from interface:IArgsThe total number of arguments. -
toString
-