gumbo.visualize.data.layout
Class GraphLayoutNode.BoundComparator

java.lang.Object
  |
  +--gumbo.visualize.data.layout.GraphLayoutNode.BoundComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
GraphLayoutNode

public static class GraphLayoutNode.BoundComparator
extends java.lang.Object
implements java.util.Comparator

A comparator for ordering nodes (GraphLayoutNode) by min or max extent along a given dimension.


Constructor Summary
GraphLayoutNode.BoundComparator(boolean sortAll, boolean useMin, int dim)
          Creates an instance that orders nodes along the specified position dimension.
 
Method Summary
 int compare(java.lang.Object nodeA, java.lang.Object nodeB)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

GraphLayoutNode.BoundComparator

public GraphLayoutNode.BoundComparator(boolean sortAll,
                                       boolean useMin,
                                       int dim)
Creates an instance that orders nodes along the specified position dimension.

Parameters:
sortAll - If true, all nodes are sorted (compare() never returns zero), with equal position nodes being sorted by hash code.
useMin - If true, uses the minimum extent; otherwise, use the maximum one.
dim - Dimension (0:2).
Method Detail

compare

public int compare(java.lang.Object nodeA,
                   java.lang.Object nodeB)
Specified by:
compare in interface java.util.Comparator