예제 #1
0
 /**
  * Find a new name that isn't among the used names.
  *
  * @param prefix
  * @param usedNames
  * @return
  */
 public static String unusedName(String prefix, Iterator usedNames) {
   SortedSet u = new TreeSet();
   while (usedNames.hasNext()) {
     String curr = (String) usedNames.next();
     if (curr.startsWith(prefix)) {
       String postfix = curr.substring(prefix.length());
       u.add(postfix);
     }
   }
   int count = 0;
   while (u.contains(String.valueOf(count))) {
     count++;
   }
   return prefix + count;
 }
예제 #2
0
 public Object next() {
   return ((AttrConfig) attrs.next()).getAttrName();
 }
예제 #3
0
 public Object next() {
   return ((Config) descs.next()).getDescName();
 }
예제 #4
0
 public boolean hasNext() {
   return attrs.hasNext();
 }
예제 #5
0
 public boolean hasNext() {
   return descs.hasNext();
 }