|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.soda.sat.core.util.CollectionUtility
public class CollectionUtility
Nested Class Summary | |
---|---|
static interface |
CollectionUtility.Accessor
|
static interface |
CollectionUtility.InjectionAccessor
|
Method Summary | |
---|---|
List |
collect(Collection collection,
CollectionUtility.Accessor accessor)
For each of the objects in the specified Collection
collect objects using the specified Accessor object. |
Object |
detect(Collection collection,
CollectionUtility.Accessor accessor)
Detect the first object in the specified Collection for
which the specified Accessor does not return
null . |
int |
estimateHashedCollectionSize(int capacity)
Estimate the size of a hashed collection based on the specified capacity. |
static CollectionUtility |
getInstance()
Public getter for the CollectionUtility singleton instance. |
Object |
inject(Collection collection,
Object value,
CollectionUtility.InjectionAccessor accessor)
Inject each item in the specified collection into the specified Object using the specified accessor. |
List |
reject(Collection collection,
CollectionUtility.Accessor accessor)
Reject those items in the specified Collection as defined by
the specified Accessor . |
List |
select(Collection collection,
CollectionUtility.Accessor accessor)
Select those items in the specified Collection as defined by
the specified Accessor . |
List |
toList(Enumeration enumeration)
Convert the specified Enumeration into a List . |
List |
toList(Enumeration enumeration,
List list)
Add the specified Enumeration to the specified
List . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CollectionUtility getInstance()
CollectionUtility
singleton instance.
CollectionUtility
public List collect(Collection collection, CollectionUtility.Accessor accessor)
Collection
collect objects using the specified Accessor
object.
collection
- A Collection
.accessor
- The object Acccessor
.
public Object detect(Collection collection, CollectionUtility.Accessor accessor)
Collection
for
which the specified Accessor
does not return
null
.
collection
- A Collection
.accessor
- An Accessor
.
public int estimateHashedCollectionSize(int capacity)
capacity
- The number of elements the hash collections must hold.
public Object inject(Collection collection, Object value, CollectionUtility.InjectionAccessor accessor)
Object
using the specified accessor.
collection
- A Collection
of objects to be injected.value
- The target for the injection.accessor
- The accessor defining the injection behavior.
public List reject(Collection collection, CollectionUtility.Accessor accessor)
Collection
as defined by
the specified Accessor
.
collection
- The items from which to reject.accessor
- The rejection accessor.
List
of items that were not rejected, never
null
.public List select(Collection collection, CollectionUtility.Accessor accessor)
Collection
as defined by
the specified Accessor
.
collection
- The items from which to select.accessor
- The selection accessor.
List
of selected items, never null
public List toList(Enumeration enumeration)
Enumeration
into a List
.
enumeration
- The source Enumeration
.
List
containing the items in the source
Enumeration
public List toList(Enumeration enumeration, List list)
Enumeration
to the specified
List
.
enumeration
- The source Enumeration
.list
- The target List
.
List
.
|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001, 2008 IBM Corporation and others. All Rights Reserved.