Class ILists

java.lang.Object
org.javimmutable.collections.ILists

public final class ILists extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> IList<T>
    allOf(Iterable<? extends T> source)
    Efficiently produces a IList containing all of the values in source built atop a balanced binary tree.
    static <T> IList<T>
    allOf(Iterator<? extends T> source)
    Efficiently produces a IList containing all of the values in source built atop a balanced binary tree.
    static <T> IListBuilder<T>
    Produces a Builder for efficiently constructing a IList built atop a balanced binary tree.
    static <T> IList<T>
    of()
    Produces an empty IList built atop a balanced binary tree.
    static <T> IList<T>
    of(T... values)
    Efficiently produces a IList containing all of the specified values built atop a balanced binary tree.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • of

      @Nonnull public static <T> IList<T> of()
      Produces an empty IList built atop a balanced binary tree.
    • of

      @Nonnull @SafeVarargs public static <T> IList<T> of(T... values)
      Efficiently produces a IList containing all of the specified values built atop a balanced binary tree.
    • allOf

      @Nonnull public static <T> IList<T> allOf(@Nonnull Iterator<? extends T> source)
      Efficiently produces a IList containing all of the values in source built atop a balanced binary tree.
    • allOf

      @Nonnull public static <T> IList<T> allOf(@Nonnull Iterable<? extends T> source)
      Efficiently produces a IList containing all of the values in source built atop a balanced binary tree.
    • builder

      @Nonnull public static <T> IListBuilder<T> builder()
      Produces a Builder for efficiently constructing a IList built atop a balanced binary tree.