Package de.intarsys.tools.functor
Class Args
java.lang.Object
de.intarsys.tools.functor.Args
- All Implemented Interfaces:
IArgs
A concrete generic implementation for
IArgs.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()static Argscreate()static Argsstatic ArgscreateIndexed(Object p1) static ArgscreateIndexed(Object p1, Object p2) static ArgscreateIndexed(Object p1, Object p2, Object p3) static Argsstatic ArgscreateNamed(String key, Object value) static ArgscreateNamed(String key1, Object value1, String key2, Object value2) get(int index) The argument at positionindex.The argument at positionindexThe argument namedname.The argument namednameor the defaultValue if not available.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()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Args
public Args() -
Args
-
Args
-
Args
-
Args
-
-
Method Details
-
create
-
createIndexed
-
createIndexed
-
createIndexed
-
createIndexed
-
createNamed
-
createNamed
-
createNamed
-
add
-
clear
public void clear() -
declare
-
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. -
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
-