@Override public int compareTo(Identifiable i) { if (i instanceof Group) { Group j = (Group) i; if (this.getID().compareTo(j.getID()) < 0) { return -1; } else if (this.getID().compareTo(j.getID()) > 0) { return 1; } else { return 0; } } else { return (this.getID().compareTo(i.getID())); } }
/** * @param identifiables * @return the string representations of the wrapped identifiers */ public static Collection<String> toString( final Collection<? extends Identifiable<?>> identifiables) { final Collection<String> result = new ArrayList<String>(); for (Identifiable<?> identifier : identifiables) result.add(identifier.getID().toString()); return result; }