@Test public void test() { assertAll( () -> assertThrows(IllegalArgumentException.class, () -> NonEmptyList.of(null)), () -> assertThrows(IllegalArgumentException.class, () -> NonEmptyList.of(ImmutableList.empty())), () -> assertDoesNotThrow(() -> NonEmptyList.of(1)) ); }
@SafeVarargs public static <E> NonEmptyList<E> of(E value, E... values) { return of(listOf(value).appendAll(listOf(values))); }
NonEmptyList implements ImmutableList<E>, Serializable { @SafeVarargs public static <E> NonEmptyList<E> of(E value, E... values) { return of(listOf(value).appendAll(listOf(values))); } }
NonEmptyList implements ImmutableList<E>, Serializable { @SafeVarargs public static <E> NonEmptyList<E> of(E value, E... values) { return of(listOf(value).appendAll(listOf(values))); } private  NonEmptyList(ImmutableList<E> value); }
NonEmptyList implements ImmutableList<E>, Serializable { @SafeVarargs public static <E> NonEmptyList<E> of(E value, E... values) { return of(listOf(value).appendAll(listOf(values))); } private  NonEmptyList(ImmutableList<E> value); @Override NonEmptyList<R> map(Function1<? super E, ? extends R> mapper); @Override NonEmptyList<R> flatMap(Function1<? super E, ? extends Sequence<? extends R>> mapper); @Override ImmutableList<E> filter(Matcher1<? super E> matcher); @Override ImmutableList<E> filterNot(Matcher1<? super E> matcher); @Override List<E> toList(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(E element); @Override NonEmptyList<E> append(E element); @Override ImmutableList<E> remove(E element); @Override NonEmptyList<E> appendAll(Sequence<? extends E> other); @Override ImmutableList<E> removeAll(Sequence<? extends E> other); @Override NonEmptyList<E> reverse(); @Override NonEmptyList<E> sort(Comparator<? super E> comparator); @Override Iterator<E> iterator(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @SafeVarargs static NonEmptyList<E> of(E value, E... values); static NonEmptyList<E> of(ImmutableList<E> value); }
NonEmptyList implements ImmutableList<E>, Serializable { @SafeVarargs public static <E> NonEmptyList<E> of(E value, E... values) { return of(listOf(value).appendAll(listOf(values))); } private  NonEmptyList(ImmutableList<E> value); @Override NonEmptyList<R> map(Function1<? super E, ? extends R> mapper); @Override NonEmptyList<R> flatMap(Function1<? super E, ? extends Sequence<? extends R>> mapper); @Override ImmutableList<E> filter(Matcher1<? super E> matcher); @Override ImmutableList<E> filterNot(Matcher1<? super E> matcher); @Override List<E> toList(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(E element); @Override NonEmptyList<E> append(E element); @Override ImmutableList<E> remove(E element); @Override NonEmptyList<E> appendAll(Sequence<? extends E> other); @Override ImmutableList<E> removeAll(Sequence<? extends E> other); @Override NonEmptyList<E> reverse(); @Override NonEmptyList<E> sort(Comparator<? super E> comparator); @Override Iterator<E> iterator(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @SafeVarargs static NonEmptyList<E> of(E value, E... values); static NonEmptyList<E> of(ImmutableList<E> value);  }