T - The type of elements@Immutable public final class SNonEmptyList<T> extends Object
| 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() |
@Nonnull public static <T> SNonEmptyList<T> newList(@Nonnull List<T> elements) throws com.io7m.jaux.Constraints.ConstraintError
T - The type of elementselements - The list of elementscom.io7m.jaux.Constraints.ConstraintError - If the list is empty@Nonnull public static <T> SNonEmptyList<T> one(@Nonnull T e) throws com.io7m.jaux.Constraints.ConstraintError
T - The type of elementse - A single elementcom.io7m.jaux.Constraints.ConstraintError - If the list is emptyCopyright © 2014. All rights reserved.