java.lang.Object
io.lettuce.core.internal.LettuceLists
public final class LettuceLists extends Object
Static utility methods for
List instances. This class is part of the internal API and may change without further
notice.- Since:
- 4.2
- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description static <T> List<T>newList(Iterable<? extends T> elements)Creates a newArrayListcontaining all elements fromelements.static <T> List<T>newList(Iterator<? extends T> elements)Creates a newArrayListcontaining all elements fromelements.static <T> List<T>newList(T... elements)Creates a newArrayListcontaining all elements fromelements.static <T> List<T>unmodifiableList(Collection<? extends T> elements)Creates a new unmodifiableArrayListcontaining all elements fromelements.static <T> List<T>unmodifiableList(T... elements)Creates a new unmodifiableArrayListcontaining all elements fromelements.
-
Method Details
-
newList
Creates a newArrayListcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the list should contain, must not benull.- Returns:
- a new
ArrayListcontaining all elements fromelements.
-
newList
Creates a newArrayListcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the list should contain, must not benull.- Returns:
- a new
ArrayListcontaining all elements fromelements.
-
newList
Creates a newArrayListcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the list should contain, must not benull.- Returns:
- a new
ArrayListcontaining all elements fromelements.
-
unmodifiableList
Creates a new unmodifiableArrayListcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the list should contain, must not benull.- Returns:
- a new
ArrayListcontaining all elements fromelements.
-
unmodifiableList
Creates a new unmodifiableArrayListcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the list should contain, must not benull.- Returns:
- a new
ArrayListcontaining all elements fromelements.
-