|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.almendra.commons.util.collection.CollectionUtility
public class CollectionUtility
CollectionUtility
provides several utility methods to deal with collentions
not found in Collections
or other classes of the Java collection framework.
Method Summary | |
---|---|
static java.util.Set |
duplicates(java.util.List listOfLists)
Answer all elements that appear in more than once the collections contained in listOfLists . |
static java.util.List |
toList(java.util.Collection collection)
Convert a Collection to a List . |
static java.util.List |
toList(java.lang.Object object)
Answer a List containing an object. |
static java.util.Set |
toSet(java.util.Collection collection)
Convert a Collection to a Set . |
static java.lang.String[] |
toStringArray(java.util.Collection collection)
Answer an array of strings containing all the strings of the collection argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.Set duplicates(java.util.List listOfLists)
listOfLists
.
listOfLists
- list that contains lists
public static java.util.Set toSet(java.util.Collection collection)
Collection
to a Set
.
collection
- to be converted
public static java.util.List toList(java.util.Collection collection)
Collection
to a List
.
collection
- to be converted
public static java.util.List toList(java.lang.Object object)
List
containing an object.
object
- to be contained in a list
public static java.lang.String[] toStringArray(java.util.Collection collection)
collection
- the argument collection containing strings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |