Beispiel #1
0
 /** @deprecated */
 public Enumeration getConditionalPermissionInfos() {
   // could implement our own Enumeration, but we don't care about performance here.  Just do
   // something simple:
   synchronized (lock) {
     SecurityRow[] rows = condAdminTable.getRows();
     Vector vRows = new Vector(rows.length);
     for (int i = 0; i < rows.length; i++) vRows.add(rows[i]);
     return vRows.elements();
   }
 }
Beispiel #2
0
 public static Enumeration compoundEnumerations(Enumeration list1, Enumeration list2) {
   if (list2 == null || !list2.hasMoreElements()) return list1;
   if (list1 == null || !list1.hasMoreElements()) return list2;
   Vector compoundResults = new Vector();
   while (list1.hasMoreElements()) compoundResults.add(list1.nextElement());
   while (list2.hasMoreElements()) {
     Object item = list2.nextElement();
     if (!compoundResults.contains(item)) // don't add duplicates
     compoundResults.add(item);
   }
   return compoundResults.elements();
 }