Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class MinimalList extends Object
size=0: null
size=1: Collections.singletonList
size=2: ArrayList
| Modifier and Type | Method and Description |
|---|---|
static <E> List<E> |
add(List<E> list,
E elem)
Adds a new element to a list, returning the (possibly new) list.
|
static <E> List<E> |
copy(List<E> list)
Performs a shallow copy of a list.
|
static <E> E |
get(List<E> list,
int index)
Gets an element from a list.
|
static <E> List<E> |
unmodifiable(List<E> list)
Gets an unmodifiable wrapper around this list.
|
public static <E> List<E> add(List<E> list, E elem)
public static <E> E get(List<E> list, int index) throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionpublic static <E> List<E> copy(List<E> list)
Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.