org.planx.util
Class UnmodifiableArrayList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by org.planx.util.UnmodifiableArrayList<E>
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class UnmodifiableArrayList<E>
extends AbstractList<E>
implements RandomAccess, Serializable

Author:
Thomas Ambus
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
UnmodifiableArrayList(E[] array)
           
UnmodifiableArrayList(List<E> list)
           
 
Method Summary
 boolean contains(Object o)
           
 E get(int index)
           
 int indexOf(Object o)
           
 E[] internal()
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] array)
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, retainAll
 

Constructor Detail

UnmodifiableArrayList

public UnmodifiableArrayList(List<E> list)

UnmodifiableArrayList

public UnmodifiableArrayList(E[] array)
Method Detail

internal

public E[] internal()

size

public int size()
Specified by:
size in interface Collection<E>
Specified by:
size in interface List<E>
Specified by:
size in class AbstractCollection<E>

get

public E get(int index)
Specified by:
get in interface List<E>
Specified by:
get in class AbstractList<E>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<E>
Overrides:
indexOf in class AbstractList<E>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<E>
Specified by:
contains in interface List<E>
Overrides:
contains in class AbstractCollection<E>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Overrides:
toArray in class AbstractCollection<E>

toArray

public <T> T[] toArray(T[] array)
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Overrides:
toArray in class AbstractCollection<E>


Copyright © 2010. All Rights Reserved.