y25.base
Class GraphList

java.lang.Object
  extended byy.base.YList
      extended byy25.base.GraphList
All Implemented Interfaces:
Collection

public class GraphList
extends YList

Specialized list implementation for instances of type Graph.

Iterating over the elements of this list is accomplished by retrieving a GraphCursor via the method graphs (see the GraphCursor documentation for an example).


Nested Class Summary
 
Nested classes inherited from class y.base.YList
YList.ListCursorImpl
 
Constructor Summary
GraphList()
          Creates an empty graph list.
GraphList(Graph graph)
          Creates a list that is initialized with a single graph provided.
GraphList(Graph[] graphs)
          Creates a list that is initialized with the graphs provided by the given array of graphs.
GraphList(GraphCursor gc)
          Creates a list that is initialized with the graphs provided by the given GraphCursor object.
GraphList(GraphCursor gc, DataProvider predicate)
          Creates a list that is initialized with those graphs from the given GraphCursor object for which the given data provider returns true upon calling its getBool method.
GraphList(Iterator it)
          Creates a list that is initialized with the elements provided by the given Iterator object.
 
Method Summary
 Graph firstGraph()
          Returns the first graph in this list, or null when the list is empty.
 GraphCursor graphs()
          Returns a graph cursor for the graphs.
 Graph lastGraph()
          Returns the last graph in this list, or null when the list is empty.
 
Methods inherited from class y.base.YList
add, addAll, addAll, addFirst, addFirstCell, addLast, addLastCell, clear, contains, containsAll, cursor, cyclicPred, cyclicSucc, elementAt, findCell, first, firstCell, getInfo, indexOf, insertAfter, insertBefore, insertCellAfter, insertCellBefore, isEmpty, iterator, last, lastCell, peek, pop, popLast, predCell, push, remove, removeAll, removeAt, removeCell, retainAll, reverse, setInfo, size, sort, sort, splice, succCell, toArray, toArray, toString, toVector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

GraphList

public GraphList()
Creates an empty graph list.


GraphList

public GraphList(Graph graph)
Creates a list that is initialized with a single graph provided.


GraphList

public GraphList(Graph[] graphs)
Creates a list that is initialized with the graphs provided by the given array of graphs.


GraphList

public GraphList(GraphCursor gc)
Creates a list that is initialized with the graphs provided by the given GraphCursor object.


GraphList

public GraphList(GraphCursor gc,
                 DataProvider predicate)
Creates a list that is initialized with those graphs from the given GraphCursor object for which the given data provider returns true upon calling its getBool method.

Parameters:
gc - A graph cursor providing graphs that should be added to this list.
predicate - A data provider that acts as a inclusion predicate for each graph accessible by the given graph cursor.

GraphList

public GraphList(Iterator it)
Creates a list that is initialized with the elements provided by the given Iterator object.

Method Detail

firstGraph

public Graph firstGraph()
Returns the first graph in this list, or null when the list is empty.


lastGraph

public Graph lastGraph()
Returns the last graph in this list, or null when the list is empty.


graphs

public GraphCursor graphs()
Returns a graph cursor for the graphs.