|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.util.Comparators
This class provides access to some Comparator instances that are commenly used in yFiles.
Constructor Summary | |
Comparators()
|
Method Summary | |
static Comparator |
createComparableComparator()
Returns a comparator that compares to Objects of type Comparable. |
static Comparator |
createDoubleDataComparator(DataProvider dp)
Returns a comparator that compares objects of arbitrary type. |
static Comparator |
createDoubleDataSourceComparator(DataProvider dp)
Returns a comparator that compares objects of type Edge . |
static Comparator |
createDoubleDataTargetComparator(DataProvider dp)
Returns a comparator that compares objects of type Edge . |
static Comparator |
createIntDataComparator(DataProvider dp)
Returns a comparator that compares objects of arbitrary type. |
static Comparator |
createIntDataSourceComparator(DataProvider dp)
Returns a comparator that compares objects of type Edge . |
static Comparator |
createIntDataTargetComparator(DataProvider dp)
Returns a comparator that compares objects of type Edge . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Comparators()
Method Detail |
public static Comparator createIntDataSourceComparator(DataProvider dp)
Edge
. Two edges are compared by comparing their
source nodes. Each source node e.source()
in turn
is compared by the int value provided by the given data provider:
dp.getInt(e.source())
.
dp
- a dataprovider that must return an int value for
the source node of each edge being compared.
public static Comparator createIntDataTargetComparator(DataProvider dp)
Edge
. Two edges are compared by comparing their
target nodes. Each target node e.target()
in turn
is compared by the int value provided by the given data provider:
dp.getInt(e.target())
.
dp
- a dataprovider that must return an int value for
the target node of each edge being compared.
public static Comparator createDoubleDataSourceComparator(DataProvider dp)
Edge
. Two edges are compared by comparing their
source nodes. Each source node e.source()
in turn
is compared by the double value provided by the given data provider:
dp.getDouble(e.source())
.
dp
- a dataprovider that must return a double value for
the source node of each edge being compared.
public static Comparator createDoubleDataTargetComparator(DataProvider dp)
Edge
. Two edges are compared by comparing their
target nodes. Each target node e.target()
in turn
is compared by the double value provided by the given data provider:
dp.getDouble(e.target())
.
dp
- a dataprovider that must return a double value for
the target node of each edge being compared.
public static Comparator createIntDataComparator(DataProvider dp)
dp
- a dataprovider that must return an int value for
each object that is being compared by this comparator.
public static Comparator createDoubleDataComparator(DataProvider dp)
dp
- a dataprovider that must return a double value for
each object that is being compared by this comparator.
public static Comparator createComparableComparator()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |