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 TypeMethodDescriptionvoid
void
clear()
static Args
create()
static Args
static Args
createIndexed
(Object p1) static Args
createIndexed
(Object p1, Object p2) static Args
createIndexed
(Object p1, Object p2, Object p3) static Args
static Args
createNamed
(String key, Object value) static Args
createNamed
(String key1, Object value1, String key2, Object value2) get
(int index) The argument at positionindex
.The argument at positionindex
The argument namedname
.The argument namedname
or the defaultValue if not available.boolean
isDefined
(int index) true
if an argument atindex
is defined.boolean
true
if an argument namedname
is defined.boolean
true
if this argument list is indexed.boolean
isNamed()
true
if 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.void
void
int
size()
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:IArgs
The argument at positionindex
. -
get
Description copied from interface:IArgs
The argument at positionindex
-
get
Description copied from interface:IArgs
The argument namedname
. -
get
Description copied from interface:IArgs
The argument namedname
or the defaultValue if not available. -
isDefined
public boolean isDefined(int index) Description copied from interface:IArgs
true
if an argument atindex
is defined. -
isDefined
Description copied from interface:IArgs
true
if an argument namedname
is defined. -
isIndexed
public boolean isIndexed()Description copied from interface:IArgs
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.
-
isNamed
public boolean isNamed()Description copied from interface:IArgs
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.
-
names
Description copied from interface:IArgs
The 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:IArgs
The total number of arguments. -
toString
-