package org.eclipse.collections.api.factory.list;
import java.util.Comparator;
import java.util.stream.Stream;
import org.eclipse.collections.api.RichIterable;
import org.eclipse.collections.api.factory.Lists;
import org.eclipse.collections.api.list.ImmutableList;
import org.eclipse.collections.api.list.MutableList;
public interface ImmutableListFactory
{
<T> ImmutableList<T> empty();
<T> ImmutableList<T> of();
<T> ImmutableList<T> with();
<T> ImmutableList<T> of(T one);
<T> ImmutableList<T> with(T one);
<T> ImmutableList<T> of(T one, T two);
<T> ImmutableList<T> with(T one, T two);
<T> ImmutableList<T> of(T one, T two, T three);
<T> ImmutableList<T> with(T one, T two, T three);
<T> ImmutableList<T> of(T one, T two, T three, T four);
<T> ImmutableList<T> with(T one, T two, T three, T four);
<T> ImmutableList<T> of(T one, T two, T three, T four, T five);
<T> ImmutableList<T> with(T one, T two, T three, T four, T five);
<T> ImmutableList<T> of(T one, T two, T three, T four, T five, T six);
<T> ImmutableList<T> with(T one, T two, T three, T four, T five, T six);
<T> ImmutableList<T> of(T one, T two, T three, T four, T five, T six, T seven);
<T> ImmutableList<T> with(T one, T two, T three, T four, T five, T six, T seven);
<T> ImmutableList<T> of(T one, T two, T three, T four, T five, T six, T seven, T eight);
<T> ImmutableList<T> with(T one, T two, T three, T four, T five, T six, T seven, T eight);
<T> ImmutableList<T> of(T one, T two, T three, T four, T five, T six, T seven, T eight, T nine);
<T> ImmutableList<T> with(T one, T two, T three, T four, T five, T six, T seven, T eight, T nine);
<T> ImmutableList<T> of(T one, T two, T three, T four, T five, T six, T seven, T eight, T nine, T ten);
<T> ImmutableList<T> with(T one, T two, T three, T four, T five, T six, T seven, T eight, T nine, T ten);
<T> ImmutableList<T> of(T... items);
<T> ImmutableList<T> with(T... items);
<T> ImmutableList<T> ofAll(Iterable<? extends T> items);
<T> ImmutableList<T> withAll(Iterable<? extends T> items);
default <T> ImmutableList<T> fromStream(Stream<? extends T> stream)
{
return Lists.mutable.<T>fromStream(stream).toImmutable();
}
default <T> ImmutableList<T> withAllSorted(RichIterable<? extends T> items)
{
MutableList<T> list = (MutableList<T>) items.toSortedList();
return list.toImmutable();
}
default <T> ImmutableList<T> withAllSorted(Comparator<? super T> comparator, RichIterable<? extends T> items)
{
MutableList<T> list = (MutableList<T>) items.toSortedList(comparator);
return list.toImmutable();
}
}