com.io7m.jstructural.core

## Class SNonEmptyList<T>

- java.lang.Object
- - com.io7m.jstructural.core.SNonEmptyList<T>

- Type Parameters:
    `T` - The type of elements

      @Immutable
      public final class SNonEmptyList<T>
      extends Object

  The type of non-empty lists.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `List<T>` | `getElements()`
    `int` | `hashCode()`
    `static <T> SNonEmptyList<T>` | `newList(List<T> elements)` Construct a new non-empty list from the given list
    `static <T> SNonEmptyList<T>` | `one(T e)` Construct a new non-empty list from the given element
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### newList

          public static <T> SNonEmptyList<T> newList(List<T> elements)

      Construct a new non-empty list from the given list
      Type Parameters:
        `T` - The type of elements
      Parameters:
        `elements` - The list of elements
      Returns:
        A non-empty list

    - #### one

          public static <T> SNonEmptyList<T> one(T e)

      Construct a new non-empty list from the given element
      Type Parameters:
        `T` - The type of elements
      Parameters:
        `e` - A single element
      Returns:
        A non-empty list

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getElements

          public List<T> getElements()

      Returns:
        A read-only view of the list.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015 <code@io7m.com> http://io7m.com