Class Lists
- java.lang.Object
-
- org.eclipse.collections.impl.factory.Lists
-
public final class Lists extends java.lang.Object
This class should be used to create instances of MutableList, ImmutableList and FixedSizeListMutable Examples:
MutableList<String> emptyList = Lists.mutable.empty(); MutableList<String> listWith = Lists.mutable.with("a", "b", "c"); MutableList<String> listOf = Lists.mutable.of("a", "b", "c");
Immutable Examples:ImmutableList<String> emptyList = Lists.immutable.empty(); ImmutableList<String> listWith = Lists.immutable.with("a", "b", "c"); ImmutableList<String> listOf = Lists.immutable.of("a", "b", "c");
FixedSize Examples:FixedSizeList<String> emptyList = Lists.fixedSize.empty(); FixedSizeList<String> listWith = Lists.fixedSize.with("a", "b", "c"); FixedSizeList<String> listOf = Lists.fixedSize.of("a", "b", "c");
-
-
Field Summary
Fields Modifier and Type Field Description static FixedSizeListFactory
fixedSize
static ImmutableListFactory
immutable
static MultiReaderListFactory
multiReader
static MutableListFactory
mutable
-
Constructor Summary
Constructors Modifier Constructor Description private
Lists()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> MutableList<T>
adapt(java.util.List<T> list)
-
-
-
Field Detail
-
immutable
public static final ImmutableListFactory immutable
-
mutable
public static final MutableListFactory mutable
-
fixedSize
public static final FixedSizeListFactory fixedSize
-
multiReader
public static final MultiReaderListFactory multiReader
-
-
Method Detail
-
adapt
public static <T> MutableList<T> adapt(java.util.List<T> list)
- Since:
- 9.0.
-
-