Class Horizontal.GraphNodeComparator
- java.lang.Object
-
- edu.isi.pegasus.planner.partitioner.Horizontal.GraphNodeComparator
-
- All Implemented Interfaces:
java.util.Comparator
- Enclosing class:
- Horizontal
private static class Horizontal.GraphNodeComparator extends java.lang.Object implements java.util.Comparator
A GraphNode comparator, that allows us to compare nodes according to the transformation logical names. It is applied to group jobs in a particular partition, according to the underlying transformation that is referred.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
GraphNodeComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
Compares this object with the specified object for order.
-
-
-
Method Detail
-
compare
public int compare(java.lang.Object o1, java.lang.Object o2)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer if the first argument is less than, equal to, or greater than the specified object. The SubInfo are compared by their transformation name. This implementation is not consistent with the SubInfo.equals(Object) method. Hence, should not be used in sorted Sets or Maps.- Specified by:
compare
in interfacejava.util.Comparator
- Parameters:
o1
- is the first object to be compared.o2
- is the second object to be compared.- Returns:
- a negative number, zero, or a positive number, if the object compared against is less than, equals or greater than this object.
- Throws:
java.lang.ClassCastException
- if the specified object's type prevents it from being compared to this Object.
-
-