org.eclipse.draw2d.graph
Class Rank

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byorg.eclipse.draw2d.graph.NodeList
                  extended byorg.eclipse.draw2d.graph.Rank
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class Rank
extends NodeList

Since:
2.1
See Also:
Serialized Form

Field Summary
 int total
          For internal use only.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Rank()
           
 
Method Summary
 void add(Node n)
          Adds a node to this rank.
 void assignIndices()
          $TODO move this to RankSorter
 int count()
          Returns the number of nodes in this rank.
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 void sort()
          $TODO move this to RankSorter
 
Methods inherited from class org.eclipse.draw2d.graph.NodeList
adjustRank, getNode, normalizeRanks, resetFlags, resetIndices, resetSortValues
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

total

public int total
For internal use only. The total "size" of this rank, where size may be weighted per node.

Constructor Detail

Rank

public Rank()
Method Detail

add

public void add(Node n)
Adds a node to this rank.

Parameters:
n - the node

count

public int count()
Returns the number of nodes in this rank.

Returns:
the number of nodes

equals

public boolean equals(java.lang.Object o)
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
AbstractList.hashCode()

sort

public void sort()
$TODO move this to RankSorter


assignIndices

public void assignIndices()
$TODO move this to RankSorter