Package java.util

Examples of java.util.TreeSet.toArray()


        HashMap mapAux = new LinkedHashMap();
        List mapKeys = new ArrayList(map.keySet());
        List mapValues = new ArrayList(map.values());
        TreeSet sortedSet = new TreeSet(mapValues);
        Object[] sortedArray = sortedSet.toArray();
        int size = sortedArray.length;

        for (int j=0; j<size; j++) {
           mapAux.put(mapKeys.get(mapValues.indexOf(sortedArray[j])), sortedArray[j]);
        }
View Full Code Here


            }
            for (int i = 0; i < _interfaces.length; i++) {
                queue.enqueue(_interfaces[i]);
            }
        }
        return (JavaClass[]) allInterfaces.toArray(new JavaClass[allInterfaces.size()]);
    }


    /**
     * @return Comparison strategy object
View Full Code Here

    Set result = new TreeSet();
    for (int i = 0; i < s1.length; i++)
      result.add(s1[i]);
    for (int i = 0; i < s2.length; i++)
      result.remove(s2[i]);
    return (String[]) result.toArray(stringArray0);
  }

  private boolean setEqual(String[] s1, String[] s2) {
    if (null == s1 && null == s2)
      return true;
View Full Code Here

      String[] names = cgs[i].getNames();
      for (int j = 0; j < names.length; j++) {
        results.add(names[j]);
      }
    }
    return (String[]) results.toArray(stringArray0);
  }

  public void removeCommonParmSettingsFromMultipleGroups() {
    ConfigurationParameterSettings modelSettings = getModelSettings();
    String[] allGroupNames = getAllGroupNames();
View Full Code Here

        nodeNameList.add(c.getShortName());
      }
    }
   
    String[] names = new String[nodeNameList.size()];
    names = (String[])nodeNameList.toArray(names);
   
    //for each node name in our list of node names ...
    for(int i = 0; i < names.length; i++){
      //associate that name with a unique integer in our map
      nodesToInt.put(names[i], new Integer(i+1));
View Full Code Here

        extractSourceDirs( directories, project.getTestCompileSourceRoots(), basedir, projectBaseDir, true, testOutput );

        extractResourceDirs( directories, project.getBuild().getTestResources(), project, basedir, projectBaseDir,
                             true, testOutput );

        return (EclipseSourceDir[]) directories.toArray( new EclipseSourceDir[directories.size()] );
    }

    private void extractSourceDirs( Set directories, List sourceRoots, File basedir, File projectBaseDir, boolean test,
                                    String output )
        throws MojoExecutionException
View Full Code Here

        if (preferenceKey != null)
          containers.add(new NavigationEnablementAction(preference.getPreferenceLabel(), fStore, preferenceKey));
      }
    }

    return (IAction[]) containers.toArray(new Action[containers.size()]);
  }

  /*
   * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
   */
 
View Full Code Here

        }
        final Set set = new TreeSet();
        for (final String token : array) {
            set.add(token);
        }
        return (String[]) set.toArray(new String[set.size()]);
    }

    /**
     * Split a String at the first occurrence of the delimiter.
     * Does not include the delimiter in the result.<br>
View Full Code Here

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

            return (String[]) resourceList.toArray(new String[resourceList
                .size()]);
        } catch (PrivilegedActionException pae) {
            // silently swallow all exceptions.
        } catch (IOException ioe) {
            // silently swallow all exceptions.
View Full Code Here

            return;
        }

        Collection cns = controller.getUserCertList();
        TreeSet tsCNs = new TreeSet(cns);
        Object[] objs = tsCNs.toArray();

        certList.setModel(new DefaultComboBoxModel(objs));
        if (objs.length > 0) {
            controller.setSubject(objs[0]); // default value.
        }
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.