y.base
Class EdgeList

java.lang.Object
  |
  +--y.base.YList
        |
        +--y.base.EdgeList
All Implemented Interfaces:
Collection

public class EdgeList
extends YList

This is a special list implementation for instances of type Edge.


Nested Class Summary
 
Nested classes inherited from class y.base.YList
YList.ListCursorImpl
 
Constructor Summary
EdgeList()
          Creates an empty List.
EdgeList(Edge e)
          Creates a list that is initialized with a single element provided
EdgeList(Edge[] a)
          Creates a list that is initialized with the elements provided by the given array of Edges
EdgeList(EdgeCursor c)
          Creates a list containing the edges accessible via the given edge cursor.
EdgeList(EdgeCursor c, DataProvider predicate)
          Creates a list containing the edges accessible via the given edge cursor and for which the given data provider returns true upon calling its getBool method.
EdgeList(Iterator it)
          Creates a list that is initialized with the elements provided by the Iterator it.
 
Method Summary
 EdgeCursor edges()
          Returns an edge cursor for this edge list.
 Edge firstEdge()
          Returns the first edge in this list.
 Edge lastEdge()
          Returns the last edge in this list.
 Edge popEdge()
          Removes the first edge from this list and returns it.
 Edge[] toEdgeArray()
          Returns an edge array containing all elements of this list in the canonic order.
 
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

EdgeList

public EdgeList()
Creates an empty List.


EdgeList

public EdgeList(Edge[] a)
Creates a list that is initialized with the elements provided by the given array of Edges


EdgeList

public EdgeList(EdgeCursor c)
Creates a list containing the edges accessible via the given edge cursor.

Parameters:
c - An edge cursor providing edges that are initially entered into this list.

EdgeList

public EdgeList(EdgeCursor c,
                DataProvider predicate)
Creates a list containing the edges accessible via the given edge cursor and for which the given data provider returns true upon calling its getBool method.

Parameters:
c - An edge cursor providing edges that are initially entered into this list.
predicate - a dataprovider that acts as a inclusion predicate for each edge accessible from the edge cursor

EdgeList

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


EdgeList

public EdgeList(Edge e)
Creates a list that is initialized with a single element provided

Method Detail

edges

public EdgeCursor edges()
Returns an edge cursor for this edge list.

Returns:
an edge cursor granting access to the edges within this list.

firstEdge

public Edge firstEdge()
Returns the first edge in this list.


lastEdge

public Edge lastEdge()
Returns the last edge in this list.


popEdge

public Edge popEdge()
Removes the first edge from this list and returns it.


toEdgeArray

public Edge[] toEdgeArray()
Returns an edge array containing all elements of this list in the canonic order.


© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003