edu.northwestern.at.utils

## Class ListUtils

- java.lang.Object
- - edu.northwestern.at.utils.ListUtils

-     public class ListUtils
      extends java.lang.Object

  List utilities.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ListUtils()` Don't allow instantiation, do allow overrides.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<java.lang.String>` | `loadList(java.io.File listFile, java.lang.String encoding)` Load string list from a file.
    `static java.util.List<java.lang.String>` | `loadList(java.util.List<java.lang.String> list, java.io.File listFile, java.lang.String encoding)` Load string list from a file.
    `static java.util.List<java.lang.String>` | `loadList(java.util.List<java.lang.String> list, java.lang.String listFileName, java.lang.String encoding)` Load string list from a file name.
    `static java.util.List<java.lang.String>` | `loadList(java.util.List<java.lang.String> list, java.net.URL setURL, java.lang.String encoding)` Load string list from a URL.
    `static java.util.List<java.lang.String>` | `loadList(java.lang.String listFileName, java.lang.String encoding)` Load string list from a file name.
    `static java.util.List<java.lang.String>` | `loadList(java.net.URL setURL, java.lang.String encoding)` Load string list from a URL.
    `static void` | `saveList(java.util.List<?> list, java.io.File listFile, java.lang.String encoding)` Save list as string to a file.
    `static void` | `saveList(java.util.List<?> list, java.lang.String listFileName, java.lang.String encoding)` Save list as string to a file name.
    `static <E> java.util.List<E>` | `shallowClone(java.util.List<E> list)` Get shallow clone of list contents.

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

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

- - ### Constructor Detail

    - #### ListUtils

          protected ListUtils()

      Don't allow instantiation, do allow overrides.

  - ### Method Detail

    - #### loadList

          public static java.util.List<java.lang.String> loadList(java.util.List<java.lang.String> list,
                                                  java.net.URL setURL,
                                                  java.lang.String encoding)
                                                           throws java.io.IOException,
                                                                  java.io.FileNotFoundException

      Load string list from a URL.
      Parameters:
        `list` - List into which to load strings. Created if null.
        `setURL` - URL for list file.
        `encoding` - Character encoding for the file.
      Returns:
        List with values read from file.
      Throws:
        `java.io.FileNotFoundException` - If input file does not exist.
        `java.io.IOException` - If input file cannot be opened.

    - #### loadList

          public static java.util.List<java.lang.String> loadList(java.net.URL setURL,
                                                  java.lang.String encoding)
                                                           throws java.io.IOException,
                                                                  java.io.FileNotFoundException

      Load string list from a URL.
      Parameters:
        `setURL` - URL for list file.
        `encoding` - Character encoding for the file.
      Returns:
        List with values read from file.
      Throws:
        `java.io.FileNotFoundException` - If input file does not exist.
        `java.io.IOException` - If input file cannot be opened.

    - #### loadList

          public static java.util.List<java.lang.String> loadList(java.util.List<java.lang.String> list,
                                                  java.io.File listFile,
                                                  java.lang.String encoding)
                                                           throws java.io.IOException,
                                                                  java.io.FileNotFoundException

      Load string list from a file.
      Parameters:
        `list` - List into which to load strings. Created if null.
        `listFile` - File from which to load list.
        `encoding` - Character encoding for the file.
      Returns:
        List with values read from file.
      Throws:
        `java.io.FileNotFoundException` - If input file does not exist.
        `java.io.IOException` - If input file cannot be opened.

    - #### loadList

          public static java.util.List<java.lang.String> loadList(java.io.File listFile,
                                                  java.lang.String encoding)
                                                           throws java.io.IOException,
                                                                  java.io.FileNotFoundException

      Load string list from a file.
      Parameters:
        `listFile` - File from which to load list.
        `encoding` - Character encoding for the file.
      Returns:
        List with values read from file.
      Throws:
        `java.io.FileNotFoundException` - If input file does not exist.
        `java.io.IOException` - If input file cannot be opened.

    - #### loadList

          public static java.util.List<java.lang.String> loadList(java.util.List<java.lang.String> list,
                                                  java.lang.String listFileName,
                                                  java.lang.String encoding)
                                                           throws java.io.IOException,
                                                                  java.io.FileNotFoundException

      Load string list from a file name.
      Parameters:
        `list` - List into which to load strings. Created if null.
        `listFileName` - File name from which to load list.
        `encoding` - Character encoding for the file.
      Returns:
        List with values read from file name.
      Throws:
        `java.io.FileNotFoundException` - If input file does not exist.
        `java.io.IOException` - If input file cannot be opened.

    - #### loadList

          public static java.util.List<java.lang.String> loadList(java.lang.String listFileName,
                                                  java.lang.String encoding)
                                                           throws java.io.IOException,
                                                                  java.io.FileNotFoundException

      Load string list from a file name.
      Parameters:
        `listFileName` - File name from which to load list.
        `encoding` - Character encoding for the file.
      Returns:
        List with values read from file name.
      Throws:
        `java.io.FileNotFoundException` - If input file does not exist.
        `java.io.IOException` - If input file cannot be opened.

    - #### saveList

          public static void saveList(java.util.List<?> list,
                      java.io.File listFile,
                      java.lang.String encoding)
                               throws java.io.IOException,
                                      java.io.FileNotFoundException

      Save list as string to a file.
      Parameters:
        `list` - List to save.
        `listFile` - Output file name.
        `encoding` - Character encoding for the file.
      Throws:
        `java.io.IOException` - If output file has error.
        `java.io.FileNotFoundException`

    - #### saveList

          public static void saveList(java.util.List<?> list,
                      java.lang.String listFileName,
                      java.lang.String encoding)
                               throws java.io.IOException,
                                      java.io.FileNotFoundException

      Save list as string to a file name.
      Parameters:
        `list` - List to save.
        `listFileName` - Output file name.
        `encoding` - Character encoding for the file.
      Throws:
        `java.io.IOException` - If output file has error.
        `java.io.FileNotFoundException`

    - #### shallowClone

          public static <E> java.util.List<E> shallowClone(java.util.List<E> list)

      Get shallow clone of list contents.
      Parameters:
        `list` - List to clone.
      Returns:
        Shallow clone of input list.