org.crosswire.common.util

## Class CollectionUtil

- java.lang.Object
- - org.crosswire.common.util.CollectionUtil

-     public final class CollectionUtil
      extends Object

  Some utils to help work with Collections.
  Author:
    Joe Walker
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `CollectionUtil()` Dont do this

  - ### Method Summary

    Methods
    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`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CollectionUtil

          private CollectionUtil()

      Dont do this

  - ### Method Detail

    - #### createList

          public static <T> List<T> createList(Iterable<T> it)

      Create a List from an Iterable.
      Type Parameters:
        `T` - The type of data for the list
      Parameters:
        `it` - The source of data for the list
      Returns:
        List

    - #### createSet

          public static <T> Set<T> createSet(Iterable<T> it)

      Create a Set from an Iterable.
      Type Parameters:
        `T` - The type of data for the list
      Parameters:
        `it` - The source of data for the list
      Returns:
        the created set

    - #### properties2Map

          public static PropertyMap properties2Map(Properties prop)

      Convert a `Properties` into a `Map`.
      Parameters:
        `prop` - The Properties to convert
      Returns:
        The map

    - #### properties2Map

          public static PropertyMap properties2Map(URI propUri)
                                            throws IOException

      Convert a `Properties` located at `propURI` into a `Map`.
      Parameters:
        `propUri` - The URI of the Properties to convert
      Returns:
        The map
      Throws:
        `IOException` - If there is a problem with getting the properties from the URI