public class VMConsumptionComparator extends Object implements Comparator<VM>, Serializable
Constructor and Description |
---|
VMConsumptionComparator(ShareableResource rc)
Make a new comparator.
|
VMConsumptionComparator(ShareableResource rc,
boolean asc)
Make a new comparator.
|
Modifier and Type | Method and Description |
---|---|
VMConsumptionComparator |
append(ShareableResource r,
boolean asc)
Append a new resource to use to make the comparison
|
int |
compare(VM v1,
VM v2) |
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 VMConsumptionComparator(ShareableResource rc)
rc
- the resource to consider.public VMConsumptionComparator(ShareableResource rc, boolean asc)
rc
- the resource to considerasc
- true
for an ascending comparisonpublic VMConsumptionComparator append(ShareableResource r, boolean asc)
r
- the resource to addasc
- true
for an ascending comparisonpublic int compare(VM v1, VM v2)
compare
in interface Comparator<VM>
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.