JavaScript is disabled on your browser.
CharGer conceptual graph and knowledge modeling tool
Object
cgif.generate.compare.NumericLabelComparator
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface Comparator
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Method Detail
compare
public int compare(GEdge e1,
GEdge e2)
throws NumberFormatException
Compares the labels of the two edges by assuming they are both
integers. If either isn't an integer, a NumberFormatException will
be thrown.
Specified by:
compare
in interface Comparator<GEdge >
Parameters:
e1
- First edge to compare
e2
- Second edge to compare
Returns:
Returns negative value if the label of e1 < e2, returns 0 if they are
equivalent, and returns [positive if the label of e1 > e2.
* returns positive if the first is null, and negative if the 2nd is null.
Throws:
NumberFormatException
CharGer conceptual graph and knowledge modeling tool
Copyright 1998-2020 by Harry Delugach. All Rights Reserved. Copying is governed by the Lesser GPL license.