org.apache.openjpa.lib.rop
Class AbstractResultList<E>

java.lang.Object
  extended by org.apache.openjpa.lib.rop.AbstractResultList<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, ResultList<E>, Closeable
Direct Known Subclasses:
AbstractNonSequentialResultList, AbstractSequentialResultList, ListResultList

public abstract class AbstractResultList<E>
extends java.lang.Object
implements ResultList<E>

Abstract base class for read-only result lists.

Author:
Abe White
See Also:
Serialized Form

Constructor Summary
AbstractResultList()
           
 
Method Summary
 void add(int index, java.lang.Object element)
           
 boolean add(java.lang.Object o)
           
 boolean addAll(java.util.Collection<? extends E> c)
           
 boolean addAll(int index, java.util.Collection<? extends E> c)
           
protected  void assertOpen()
           
 void clear()
           
 java.lang.Object getUserObject()
          Get the opaque user object attached to this receiver.
 E remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 E set(int index, java.lang.Object element)
           
 void setUserObject(java.lang.Object opaque)
          Set the opaque user object to this receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.lib.rop.ResultList
close, isClosed, isProviderOpen
 
Methods inherited from interface java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArray
 

Constructor Detail

AbstractResultList

public AbstractResultList()
Method Detail

add

public void add(int index,
                java.lang.Object element)
Specified by:
add in interface java.util.List<E>

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection<E>
Specified by:
add in interface java.util.List<E>

addAll

public boolean addAll(java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.Collection<E>
Specified by:
addAll in interface java.util.List<E>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.List<E>

remove

public E remove(int index)
Specified by:
remove in interface java.util.List<E>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<E>
Specified by:
remove in interface java.util.List<E>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<E>
Specified by:
removeAll in interface java.util.List<E>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<E>
Specified by:
retainAll in interface java.util.List<E>

set

public E set(int index,
             java.lang.Object element)
Specified by:
set in interface java.util.List<E>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<E>
Specified by:
clear in interface java.util.List<E>

assertOpen

protected void assertOpen()

getUserObject

public final java.lang.Object getUserObject()
Description copied from interface: ResultList
Get the opaque user object attached to this receiver.

Specified by:
getUserObject in interface ResultList<E>

setUserObject

public final void setUserObject(java.lang.Object opaque)
Description copied from interface: ResultList
Set the opaque user object to this receiver.

Specified by:
setUserObject in interface ResultList<E>