| java.lang.Object org.cougaar.util.Mappings
Mappings | final public class Mappings (Code) | | |
Method Summary | |
public static Iterator | map(Mapping m, Iterator it) | public static Collection | mapcan(Mapping m, Collection input, Collection result) Compute an element-to-n-element map of the input collection.
Essentially, this means constructing a new Collection which is
a concatenation of the resulting collections resulting from the
application of the Mapping to each element of the input collection.
In general, the Mapping should return a Collection of zero or more
elements to be added to the result map.
As a convenience, the Mapping may also return null, which is equivalent
to returning an empty collection, or a Non-Collection, which is equivalent
to returning a Collection with one element.
an ArrayList representing the mapped collection. Parameters: result - a Collection to add elements to. | public static Collection | mapcan(Mapping m, Collection c) equivalent to mapcan(Mapping m, Collection c, null) which
implies that the return value will be a new ArrayList. | public static Collection | mapcar(Mapping m, Collection input, Collection result) Compute an element-by-element map of the input collection.
Essentially, this means constructing a new Collection which is
contains the results of applying the Mapping to each element
of the input collection.
The Mapping may not return null or an IllegalArgumentException will
be thrown (use mapcan instead).
a Collection representing the mapped collection. Parameters: result - a Collection to add elements to. | public static Collection | mapcar(Mapping m, Collection c) equivalent to mapcar(Mapping m, Collection c, null) which
implies that the return value will be a new ArrayList. |
mapcan | public static Collection mapcan(Mapping m, Collection input, Collection result)(Code) | | Compute an element-to-n-element map of the input collection.
Essentially, this means constructing a new Collection which is
a concatenation of the resulting collections resulting from the
application of the Mapping to each element of the input collection.
In general, the Mapping should return a Collection of zero or more
elements to be added to the result map.
As a convenience, the Mapping may also return null, which is equivalent
to returning an empty collection, or a Non-Collection, which is equivalent
to returning a Collection with one element.
an ArrayList representing the mapped collection. Parameters: result - a Collection to add elements to. If null, creates a new ArrayList. |
mapcan | public static Collection mapcan(Mapping m, Collection c)(Code) | | equivalent to mapcan(Mapping m, Collection c, null) which
implies that the return value will be a new ArrayList.
|
mapcar | public static Collection mapcar(Mapping m, Collection input, Collection result)(Code) | | Compute an element-by-element map of the input collection.
Essentially, this means constructing a new Collection which is
contains the results of applying the Mapping to each element
of the input collection.
The Mapping may not return null or an IllegalArgumentException will
be thrown (use mapcan instead).
a Collection representing the mapped collection. Parameters: result - a Collection to add elements to. If null, defaults to an new ArrayList. |
mapcar | public static Collection mapcar(Mapping m, Collection c)(Code) | | equivalent to mapcar(Mapping m, Collection c, null) which
implies that the return value will be a new ArrayList.
|
|
|