org.javimmutable.collections.common
Class ListAdaptor<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<T>
          extended by 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.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ListAdaptor(JImmutableList<T> list)
           
 
Method Summary
 T get(int index)
           
static
<T> ListAdaptor<T>
of(JImmutableList<T> list)
           
 int size()
           
 
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 class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

ListAdaptor

public ListAdaptor(JImmutableList<T> list)
Method Detail

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.