class EvaluationUtil implements Serializable {

    public static int compare(Object o1, Object o2) {
        if(o1 == null || o2 == null){
            return (o1 == null) && (o2 == null) ? 0 : 1;
        }
        if(o1 instanceof Comparable && o2 instanceof Comparable && o1.getClass() == o2.getClass()){
            return ((Comparable)o1).compareTo((Comparable)o2);
        }else {
            throw new RuntimeException("Input Labels are not comparable!");
        }
    }

}