org.javimmutable.collections.common
Class ListAdaptor<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.javimmutable.collections.common.ListAdaptor<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, List<T>
@Immutable
public class ListAdaptor<T>
- extends AbstractList<T>
- implements List<T>
Immutable List implementation backed by a JImmutableList.
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
ListAdaptor
public ListAdaptor(JImmutableList<T> list)
of
public static <T> ListAdaptor<T> of(JImmutableList<T> list)
get
public T get(int index)
- Specified by:
get
in interface List<T>
- Specified by:
get
in class AbstractList<T>
size
public int size()
- Specified by:
size
in interface Collection<T>
- Specified by:
size
in interface List<T>
- Specified by:
size
in class AbstractCollection<T>
Copyright © 2014 Burton Computer Corporation. All rights reserved.