public int compare(IExpression o1, IExpression o2) { Integer i1 = o1.getExpressionId(); Integer i2 = o2.getExpressionId(); return i1.compareTo(i2); }