Search this API

y.base
Class EdgeList

java.lang.Object
  extended by y.base.YList
      extended by y.base.EdgeList
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.List

public class EdgeList
extends YList

Specialized list implementation for instances of type Edge.

 

Nested Class Summary
 
Nested classes/interfaces inherited from class y.base.YList
YList.ListCursorImpl
 
Constructor Summary
EdgeList()
          Creates an empty edge list.
EdgeList(Edge e)
          Creates a list that is initialized with a single edge provided.
EdgeList(Edge[] a)
          Creates a list that is initialized with the edges provided by the given array of edges.
EdgeList(EdgeCursor c)
          Creates a list that is initialized with the edges provided by the given EdgeCursor object.
EdgeList(EdgeCursor ec, DataProvider predicate)
          Creates a list that is initialized with those edges from the given EdgeCursor object for which the given data provider returns true upon calling its getBool method.
EdgeList(EdgeList edgeList)
          Creates a list that is initialized with an EdgeList.
EdgeList(java.util.Iterator it)
          Creates a list that is initialized with the elements provided by the given Iterator object.
 
Method Summary
 EdgeCursor edges()
          Returns an edge cursor for this edge list.
 Edge firstEdge()
          Returns the first edge in this list, or null when the list is empty.
 Edge lastEdge()
          Returns the last edge in this list, or null when the list is empty.
 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 canonical order.
 
Methods inherited from class y.base.YList
add, add, addAll, addAll, addAll, addFirst, addFirstCell, addLast, addLastCell, clear, contains, containsAll, cursor, cyclicPred, cyclicSucc, elementAt, equals, findCell, first, firstCell, get, getCell, getInfo, hashCode, indexOf, insertAfter, insertBefore, insertCellAfter, insertCellBefore, isEmpty, iterator, last, lastCell, lastIndexOf, listIterator, listIterator, peek, pop, popLast, predCell, push, remove, remove, removeAll, removeAt, removeCell, retainAll, reverse, set, setInfo, size, sort, sort, splice, subList, succCell, toArray, toArray, toString, toVector
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EdgeList

public EdgeList()
Creates an empty edge list.


EdgeList

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


EdgeList

public EdgeList(EdgeCursor c)
Creates a list that is initialized with the edges provided by the given EdgeCursor object.


EdgeList

public EdgeList(EdgeCursor ec,
                DataProvider predicate)
Creates a list that is initialized with those edges from the given EdgeCursor object for which the given data provider returns true upon calling its getBool method.

Parameters:
ec - An edge cursor providing edges that should be added to this list.
predicate - A data provider that acts as a inclusion predicate for each edge accessible by the given edge cursor.

EdgeList

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


EdgeList

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


EdgeList

public EdgeList(EdgeList edgeList)
Creates a list that is initialized with an EdgeList.

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, or null when the list is empty.

Returns:
The first edge in the list.

lastEdge

public Edge lastEdge()
Returns the last edge in this list, or null when the list is empty.

Returns:
The last edge in the list.

popEdge

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

Returns:
The first edge from the list.

toEdgeArray

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


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