int (final MyNode node1, final MyNode node2) { if ((node1.getConfigurable() instanceof GroupConfigurable) && (node2.getConfigurable() instanceof GroupConfigurable)) { final ProxyGroup group1 = ((GroupConfigurable) node1.getConfigurable()).getEditableObject(); final ProxyGroup group2 = ((GroupConfigurable) node2.getConfigurable()).getEditableObject(); if (group1.isDefault()) { return -1; } if (group2.isDefault()) { return 1; } } return node1.getDisplayName().compareToIgnoreCase(node2.getDisplayName()); }