edu.isi.pegasus.planner.cluster
Class Horizontal.JobComparator
java.lang.Object
edu.isi.pegasus.planner.cluster.Horizontal.JobComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- Horizontal
private class Horizontal.JobComparator
- extends Object
- implements Comparator
A job comparator, that allows me to compare jobs according to the
transformation names. It is applied to group jobs in a particular partition,
according to the underlying transformation that is referred.
This comparator is not consistent with the Job.equals(Object) method.
Hence, should not be used in sorted sets or Maps.
|
Method Summary |
int |
compare(Object o1,
Object o2)
Compares this object with the specified object for order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Horizontal.JobComparator
private Horizontal.JobComparator()
compare
public int compare(Object o1,
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
Job are compared by their transformation name.
This implementation is not consistent with the
Job.equals(Object) method. Hence, should not be used in sorted
Sets or Maps.
- Specified by:
compare in interface 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:
ClassCastException - if the specified object's type
prevents it from being compared to this Object.
Copyright © 2011 The University of Southern California. All Rights Reserved.