/** * Returns String based on the trial name that is guaramteed to be different * from any of the strings returnsed by the getName() call in any of the Descriptor objects in the Set supplied. * * @param trialName the suggested name * @param descriptors The Set of Descriptor objects to whose name attribute will not be the same as the return * @return the unique String */ public static String createUniqueNameAmongstNamedDescriptors(String trialName, Set<? extends Descriptor> descriptors) { Vector<String> v = new Vector<String>(); for (Descriptor next : descriptors) { v.addElement(next.getName()); } return createUniqueNameAmongst(trialName, v); }