Package java.util

Examples of java.util.TreeSet.toArray()


                if (!aliases.contains(impls[i]))
                    allowed.add(impls[i]);
        } catch (Throwable t) {
        }
        if (!allowed.isEmpty())
            pd.setValue(ATTRIBUTE_ALLOWED_VALUES, (String[]) allowed.toArray
                (new String[allowed.size()]));

        return pd;
    }
View Full Code Here


            Enumeration resources = (Enumeration) AccessController.doPrivileged(
                J2DoPrivHelper.getResourcesAction(loader, PREFIX + serviceName));
            while (resources.hasMoreElements())
                addResources((URL) resources.nextElement(), resourceList);

            return (String[]) resourceList.toArray(new String[resourceList
                .size()]);
        } catch (Exception e) {
            // silently swallow all exceptions.
            return new String[0];
        }
View Full Code Here

    int arraySize = array.length;
    for (int i = 0; i < arraySize; i++) {
      set.add(array[i]);
    }
    return (String[]) set.toArray(new String[set.size()]);
  }
}
View Full Code Here

        {
            entrySet.add(new EntryWrapper((ScheduleEntry) entryIterator.next(),
                    day));
        }

        EntryWrapper[] entries = (EntryWrapper[]) entrySet
                .toArray(new EntryWrapper[entrySet.size()]);

        //determine overlaps
        scanEntries(entries, 0);
View Full Code Here

               // Fall back to a Collection scan
               SortedSet set = new TreeSet();
               RecordSet rs = context.getFiler().getRecordSet();
               while ( rs.hasMoreRecords() )
                  set.add(rs.getNextKey());
               keySet = (Key[])set.toArray(EmptyKeys);
            }

            return new ResultSet(context, pr, keySet, query);
         }
         catch ( Exception e ) {
View Full Code Here

    */
   public static Key[] getUniqueKeys(IndexMatch[] matches) {
      SortedSet set = new TreeSet();
      for ( int i = 0; i < matches.length; i++ )
         set.add(matches[i].getKey());
      return (Key[])set.toArray(EmptyKeys);
   }

   /**
    * andKeySets takes several sets of unique Keys and returns the
    * ANDed set (elements that exist in all sets).  The first dimension
View Full Code Here

         }
         if ( !eq )
            highs.clear();
      }

      return (Key[])set.toArray(EmptyKeys);
   }

   /**
    * orKeySets takes several sets of unique Keys and returns the
    * ORed set (all unique elements).  The first dimension of the
View Full Code Here

      for ( int i = 0; i < keySets.length; i++ )
         for ( int j = 0; j < keySets[i].length; j++ )
            set.add(keySets[i][j]);

      return (Key[])set.toArray(EmptyKeys);
   }
  
   /**
    * normalizeString normalizes the specific String by stripping
    * all leading, trailing, and continuous runs of white space.
View Full Code Here

                    Modifier.isPublic(mods));
            m.add(vma);
        }

        members = new ValueMemberAnalysis[m.size()];
        members = (ValueMemberAnalysis[]) m.toArray(members);

        // Get superclass analysis
        Class superClass = cls.getSuperclass();
        if (superClass == java.lang.Object.class)
            superClass = null;
View Full Code Here

        IWorkingSet workingSet = (IWorkingSet) i.next();
        if (workingSet.isVisible()) {
          visibleSubset.add(workingSet);
        }
      }
        return (IWorkingSet[]) visibleSubset.toArray(new IWorkingSet[visibleSubset.size()]);
    }
   
    public IWorkingSet[] getAllWorkingSets() {
        return (IWorkingSet[]) workingSets.toArray(new IWorkingSet[workingSets.size()]);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.