org.neodatis.odb
Interface Objects<E>

All Superinterfaces:
java.util.Collection<E>, java.lang.Iterable<E>
All Known Subinterfaces:
Values
All Known Implementing Classes:
AbstractBTreeCollection, InMemoryBTreeCollection, InMemoryBTreeCollectionForValues, LazyBTreeCollection, LazySimpleListFromOid, LazySimpleListOfAOI, SimpleList, SimpleListForValues

public interface Objects<E>
extends java.util.Collection<E>

The main interface of all query results of NeoDatis ODB. Objects interface extends the Collection interface so it provides a standard collection behavior.

Author:
osmadja

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)
          Returns the collection iterator throughout the order by OrderByConstants
 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 interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

hasNext

boolean hasNext()
Inform if the internal Iterator has more objects

Returns:

next

E next()
Returns the next object of the internal iterator of the collection

Returns:

getFirst

E getFirst()
Return the first object of the collection, if exist

Returns:

reset

void reset()
Reset the internal iterator of the collection


addWithKey

boolean addWithKey(OdbComparable key,
                   E o)
Add an object into the collection using a specific ordering key

Parameters:
key -
object - The object can be an OID, can o NNOI (NonNativeObjectInfo) or the object
Returns:

addWithKey

boolean addWithKey(int key,
                   E o)
Add an object into the collection using a specific ordering key

Parameters:
key -
object -
Returns:

iterator

java.util.Iterator<E> iterator(OrderByConstants orderByType)
Returns the collection iterator throughout the order by OrderByConstants

Parameters:
orderByType -
Returns:

removeByKey

boolean removeByKey(OdbComparable key,
                    java.lang.Object value)
Removes an object by its key

Parameters:
key -
value - The object to be removed
Returns:
true if object has been removed