1 package at.ac.tuwien.lsdc.types;
3 public class SortedApplication implements Comparable<SortedApplication> {
6 private Application app;
11 public SortedApplication(Application app) {
16 public int compareTo(SortedApplication other) {
20 if(getResourceDifference(other) < 0)
22 else if(getResourceDifference(other) > 0)
28 public Application getApp() {
32 public int getResourceDifference(SortedApplication other) {
33 return app.getSize() - other.getApp().getSize() +
34 app.getRam() - other.getApp().getRam() +
35 app.getCpu() - other.getApp().getCpu();