/** * Comparison implemented so that generic rules get first, specific one are compared by service * and method */ public int compareTo(ServiceAccessRule other) { int compareService = compareServiceItems(service, other.service); if (compareService != 0) return compareService; return compareServiceItems(method, other.method); }