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 PortConstraint
s and considers the
PortConstraint
s 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
PortConstraint s. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public DefaultOutEdgeComparator()
DefaultOutEdgeComparator
instance with default settings.public int compare(Object o1, Object o2)
PortConstraint
s.
The order of edges is kept unless there are
PortConstraint
s assigned. Then the edges will be sorted to avoid edge crossings.
compare
in interface Comparator<Object>
o1
- the first edgeo2
- the second edge