public class DefaultOutEdgeComparator extends Object implements Comparator<Object>
DefaultOutEdgeComparator is the default implementation for the out-edge comparator used in
SeriesParallelLayout.
It keeps the order of the edges in the graph for edges without PortConstraints and considers the
PortConstraints such that the order of the target nodes of the outgoing edges is similar to the port
location at the source node. Note that this won't work for all cases because the target nodes may not be completely
independent.
| Constructor and Description |
|---|
DefaultOutEdgeComparator()
Creates a
DefaultOutEdgeComparator instance with default settings. |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object o1,
Object o2)
Compares the two given edges considering their
PortConstraints. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic DefaultOutEdgeComparator()
DefaultOutEdgeComparator instance with default settings.public int compare(Object o1, Object o2)
PortConstraints.
The order of edges is kept unless there are
PortConstraints assigned. Then the edges will be sorted to avoid edge crossings.
compare in interface Comparator<Object>o1 - the first edgeo2 - the second edge