public final class CollectionUtil extends Object
The GNU Lesser General Public License for details.
Modifier | Constructor and Description |
---|---|
private |
CollectionUtil()
Dont do this
|
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
createList(Iterable<T> it)
Create a List from an Iterable.
|
static <T> Set<T> |
createSet(Iterable<T> it)
Create a Set from an Iterable.
|
static PropertyMap |
properties2Map(Properties prop)
Convert a
Properties into a Map . |
static PropertyMap |
properties2Map(URI propUri)
Convert a
Properties located at propURI into a
Map . |
public static <T> List<T> createList(Iterable<T> it)
T
- The type of data for the listit
- The source of data for the listpublic static <T> Set<T> createSet(Iterable<T> it)
T
- The type of data for the listit
- The source of data for the listpublic static PropertyMap properties2Map(Properties prop)
Properties
into a Map
.prop
- The Properties to convertpublic static PropertyMap properties2Map(URI propUri) throws IOException
Properties
located at propURI
into a
Map
.propUri
- The URI of the Properties to convertIOException
- If there is a problem with getting the properties from the URI