org.chromattic.common.collection.wrapped
Class WrappedArrayList<E,A>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.chromattic.common.collection.wrapped.WrappedArrayList<E,A>
- All Implemented Interfaces:
- Iterable<E>, Collection<E>, List<E>
public abstract class WrappedArrayList<E,A>
- extends AbstractList<E>
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
static
|
create(Class<E> elementType,
Class<?> componentType,
int size)
|
protected abstract E |
get(A array,
int index)
|
E |
get(int index)
|
A |
getArray()
|
protected abstract void |
set(A array,
int index,
E element)
|
E |
set(int index,
E element)
|
int |
size()
|
protected abstract int |
size(A array)
|
static
|
wrap(Class<E> elementType,
Object array)
|
| Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subList |
WrappedArrayList
protected WrappedArrayList(A array)
throws NullPointerException
- Throws:
NullPointerException
create
public static <E,A> WrappedArrayList<E,A> create(Class<E> elementType,
Class<?> componentType,
int size)
wrap
public static <E,A> WrappedArrayList<E,A> wrap(Class<E> elementType,
Object array)
get
protected abstract E get(A array,
int index)
set
protected abstract void set(A array,
int index,
E element)
size
protected abstract int size(A array)
getArray
public final A getArray()
get
public final E get(int index)
- Specified by:
get in interface List<E>- Specified by:
get in class AbstractList<E>
set
public final E set(int index,
E element)
- Specified by:
set in interface List<E>- Overrides:
set in class AbstractList<E>
size
public final int size()
- Specified by:
size in interface Collection<E>- Specified by:
size in interface List<E>- Specified by:
size in class AbstractCollection<E>
Copyright © 2010 eXo Platform SAS. All Rights Reserved.