org.neodatis.odb.impl.core.query.list.objects
Class SimpleList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by org.neodatis.odb.impl.core.query.list.objects.SimpleList<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess, Objects<E>
Direct Known Subclasses:
SimpleListForValues

public class SimpleList<E>
extends java.util.ArrayList<E>
implements Objects<E>

A simple list to hold query result. It is used when no index and no order by is used and inMemory = true

Author:
osmadja
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SimpleList()
           
SimpleList(int initialCapacity)
           
 
Method Summary
 boolean addWithKey(int key, E o)
          Add an object into the collection using a specific ordering key
 boolean addWithKey(OdbComparable key, E o)
          Add an object into the collection using a specific ordering key
 E getFirst()
          Return the first object of the collection, if exist
 boolean hasNext()
          Inform if the internal Iterator has more objects
 java.util.Iterator<E> iterator(OrderByConstants orderByType)
          The orderByType in not supported by this kind of list
 E next()
          Returns the next object of the internal iterator of the collection
 boolean removeByKey(OdbComparable key, java.lang.Object value)
          Removes an object by its key
 void reset()
          Reset the internal iterator of the collection
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

SimpleList

public SimpleList()

SimpleList

public SimpleList(int initialCapacity)
Method Detail

addWithKey

public boolean addWithKey(OdbComparable key,
                          E o)
Description copied from interface: Objects
Add an object into the collection using a specific ordering key

Specified by:
addWithKey in interface Objects<E>
Returns:

addWithKey

public boolean addWithKey(int key,
                          E o)
Description copied from interface: Objects
Add an object into the collection using a specific ordering key

Specified by:
addWithKey in interface Objects<E>
Returns:

getFirst

public E getFirst()
Description copied from interface: Objects
Return the first object of the collection, if exist

Specified by:
getFirst in interface Objects<E>
Returns:

hasNext

public boolean hasNext()
Description copied from interface: Objects
Inform if the internal Iterator has more objects

Specified by:
hasNext in interface Objects<E>
Returns:

iterator

public java.util.Iterator<E> iterator(OrderByConstants orderByType)
The orderByType in not supported by this kind of list

Specified by:
iterator in interface Objects<E>
Returns:

next

public E next()
Description copied from interface: Objects
Returns the next object of the internal iterator of the collection

Specified by:
next in interface Objects<E>
Returns:

reset

public void reset()
Description copied from interface: Objects
Reset the internal iterator of the collection

Specified by:
reset in interface Objects<E>

removeByKey

public boolean removeByKey(OdbComparable key,
                           java.lang.Object value)
Description copied from interface: Objects
Removes an object by its key

Specified by:
removeByKey in interface Objects<E>
value - The object to be removed
Returns:
true if object has been removed