int (final Element o1, final Element o2) { for (String attribName : COMPARABLE_ATTRIB_NAMES) { final int valuesEqual = Comparing.compare(o1.getAttributeValue(attribName), o2.getAttributeValue(attribName)); if (valuesEqual != 0) { return valuesEqual; } } return 0; }