org.apache.openjpa.lib.rop
Class AbstractNonSequentialResultList

java.lang.Object
  extended by org.apache.openjpa.lib.rop.AbstractResultList
      extended by org.apache.openjpa.lib.rop.AbstractNonSequentialResultList
All Implemented Interfaces:
Serializable, Iterable, Collection, List, ResultList, Closeable
Direct Known Subclasses:
RandomAccessResultList, SimpleResultList, WindowResultList

public abstract class AbstractNonSequentialResultList
extends AbstractResultList

Abstract base class for random-access result lists. Unlike the AbstractList, this class doesn't rely on the Collection.size() method.

Author:
Abe White
See Also:
Serialized Form

Field Summary
protected static Object PAST_END
           
 
Constructor Summary
AbstractNonSequentialResultList()
           
 
Method Summary
 boolean contains(Object o)
           
 boolean containsAll(Collection c)
           
 Object get(int index)
           
protected abstract  Object getInternal(int index)
          Implement this method and List.size().
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator listIterator()
           
 ListIterator listIterator(int index)
           
 List subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
 Object[] toArray(Object[] a)
           
 
Methods inherited from class org.apache.openjpa.lib.rop.AbstractResultList
add, add, addAll, addAll, assertOpen, clear, getUserObject, remove, remove, removeAll, retainAll, set, setUserObject
 
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
equals, hashCode, size
 

Field Detail

PAST_END

protected static final Object PAST_END
Constructor Detail

AbstractNonSequentialResultList

public AbstractNonSequentialResultList()
Method Detail

getInternal

protected abstract Object getInternal(int index)
Implement this method and List.size(). Return PAST_END if the index is out of bounds.


contains

public boolean contains(Object o)

containsAll

public boolean containsAll(Collection c)

get

public Object get(int index)

indexOf

public int indexOf(Object o)

lastIndexOf

public int lastIndexOf(Object o)

isEmpty

public boolean isEmpty()

iterator

public Iterator iterator()

listIterator

public ListIterator listIterator()

listIterator

public ListIterator listIterator(int index)

toArray

public Object[] toArray()

toArray

public Object[] toArray(Object[] a)

subList

public List subList(int fromIndex,
                    int toIndex)


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.