org.mmbase.bridge.util
Class CollectionRelationList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byorg.mmbase.bridge.util.AbstractBridgeList
              extended byorg.mmbase.bridge.util.CollectionNodeList
                  extended byorg.mmbase.bridge.util.CollectionRelationList
All Implemented Interfaces:
BridgeList, Collection, List, NodeList, RelationList

public class CollectionRelationList
extends CollectionNodeList
implements RelationList

A list of nodes, based on a Collection of Nodes

Since:
MMBase-1.8
Version:
$Id: CollectionRelationList.java,v 1.1 2005/12/29 19:08:01 michiel Exp $
Author:
Michiel Meeuwissen

Nested Class Summary
protected  class CollectionRelationList.BasicRelationIterator
           
 
Nested classes inherited from class org.mmbase.bridge.util.CollectionNodeList
CollectionNodeList.BasicNodeIterator
 
Nested classes inherited from class org.mmbase.bridge.util.AbstractBridgeList
AbstractBridgeList.BasicIterator
 
Field Summary
 
Fields inherited from class org.mmbase.bridge.util.CollectionNodeList
cloud, nodeManager, wrappedCollection
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface org.mmbase.bridge.NodeList
NODESTEP_PROPERTY, QUERY_PROPERTY
 
Constructor Summary
CollectionRelationList(Collection c, Cloud cloud)
           
CollectionRelationList(Collection c, NodeManager nodeManager)
           
 
Method Summary
 Relation getRelation(int index)
          Returns the Relation at the indicated postion in the list
 RelationIterator relationIterator()
          Returns an type-specific iterator for this list.
 RelationList subRelationList(int fromIndex, int toIndex)
          Returns a sublist of this list.
protected  Object validate(Object o)
           
 
Methods inherited from class org.mmbase.bridge.util.CollectionNodeList
convert, get, getNode, nodeIterator, set, size, subNodeList
 
Methods inherited from class org.mmbase.bridge.util.AbstractBridgeList
getProperty, setProperty, sort, sort
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.NodeList
getNode, nodeIterator, subNodeList
 
Methods inherited from interface org.mmbase.bridge.BridgeList
getProperty, setProperty, sort, sort
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

CollectionRelationList

public CollectionRelationList(Collection c,
                              NodeManager nodeManager)

CollectionRelationList

public CollectionRelationList(Collection c,
                              Cloud cloud)
Method Detail

validate

protected Object validate(Object o)
                   throws ClassCastException,
                          IllegalArgumentException
Throws:
ClassCastException
IllegalArgumentException

getRelation

public Relation getRelation(int index)
Description copied from interface: RelationList
Returns the Relation at the indicated postion in the list

Specified by:
getRelation in interface RelationList
Parameters:
index - the position of the Relation to retrieve
Returns:
Relation at the indicated postion

subRelationList

public RelationList subRelationList(int fromIndex,
                                    int toIndex)
Description copied from interface: RelationList
Returns a sublist of this list.

Specified by:
subRelationList in interface RelationList
Parameters:
fromIndex - the position in the current list where the sublist starts (inclusive)
toIndex - the position in the current list where the sublist ends (exclusive)
Returns:
sublist of this list

relationIterator

public RelationIterator relationIterator()
Description copied from interface: RelationList
Returns an type-specific iterator for this list.

Specified by:
relationIterator in interface RelationList
Returns:
Relation iterator


MMBase build 1.8.1.20060716