package no.uis.ux.cipsi.net.monitoringbalancing.domain.stats;

import java.util.Comparator;

import no.uis.ux.cipsi.net.monitoringbalancing.domain.Node;

public class NodeComparator implements Comparator<Node>{

    public NodeComparator() {
    }
    @Override
    public int compare(Node n1, Node n2) {
        return Integer.valueOf(n1.getId().replaceAll("[^0-9]", "")).compareTo(Integer.valueOf(n2.getId().replaceAll("[^0-9]", "")));
        //        return n1.getId().compareTo(n2.getId());
    }

}

@@ -294,24 +294,116 @@
  Node n2) %7B%0A
+        if (n1 == null %7C%7C n2 == null %7C%7C n1.getId() == null %7C%7C n2.getId() == null) return 0;%0A
         retu

check missing inputs