Package java.util

Examples of java.util.Set.toArray()


  /**
   * Gets the names of all configured workflows.
   */
  public String[] getWorkflowNames() throws FactoryException {
    Set names = this.workflows.keySet();
    return (String[]) names.toArray(new String[names.size()]);
  }

  /**
   * Indicates whether this instance has been initialized or not.
   */
 
View Full Code Here


            }

            // Convert result to an array of Strings.
            int numNames = nameSet.size();
            CaselessStringKey[] caselessNames = new CaselessStringKey[numNames];
            nameSet.toArray(caselessNames);
            names = new String[numNames];
            for(int i = 0; i < numNames; i++) {
                names[i] = caselessNames[i].getName();
            }
        }
View Full Code Here

      String viewId) {
    Set markers = getMarkers(viewer, viewId, false);
    if (markers.isEmpty()) {
      return EMPTY_ARRAY;
    }
    return (ValidationMarker[]) markers
        .toArray(new ValidationMarker[markers.size()]);
  }

  /**
   * @generated
 
View Full Code Here

            ValueHolder eh = null;
           
            if( btree.allowDuplicates )
            {
                Set s = ( Set ) val;
                val = s.toArray();
                // to deal with passing an array to varargs param
                eh = new PersistedValueHolder( btree, ( Object[] ) val );
            }
            else
            {
View Full Code Here

     * @return the list of names of parameters in this content type
     */
    public String[] getParameterNames()
    {
        Set parameterNames = _parameters.keySet();
        return (String[]) parameterNames.toArray(new String[parameterNames.size()]);
    }

    /**
     * @param key the name of the content type parameter
     * @return the value of the content type parameter
View Full Code Here

                            set.add(result[i]);
                        }
                        set.add("flowContext");
                        set.add("continuation");
                        result = new Object[set.size()];
                        set.toArray(result);
                        return result;
                    }
                   
                    public Object get(String key) {
                        if (key.equals("flowContext")) {
View Full Code Here

        for (Iterator iterator = gbeanData.getDependencies().iterator(); iterator.hasNext();) {
            AbstractName dependencyName = ((ReferencePatterns) iterator.next()).getAbstractName();
            dependencySet.add(new GBeanDependency(this, dependencyName, kernel));
        }

        dependencies = (GBeanDependency[]) dependencySet.toArray(new GBeanDependency[dependencySet.size()]);

        // framework operations -- all framework operations have currently been removed

        // operations
        Map operationsMap = new HashMap();
View Full Code Here

                            useDefaultMappingToGuessRightOperande);
                    }
                }
            }

            String[] confs = (String[]) configsToAdd.toArray(new String[configsToAdd.size()]);
            parseDepsConfs(confs, dd, useDefaultMappingToGuessRightOperande);
        }

        protected DependencyDescriptor getDefaultConfMappingDescriptor() {
            if (defaultConfMappingDescriptor == null) {
View Full Code Here

            }
        }

        // hidden classes
        Set hiddenClassesSet = environment.getHiddenClasses();
        String[] hiddenClasses = (String[]) hiddenClassesSet.toArray(new String[hiddenClassesSet.size()]);

        // we need to propagate the non-overrideable classes from parents
        LinkedHashSet nonOverridableSet = new LinkedHashSet();
        for (Iterator iterator = classParents.iterator(); iterator.hasNext();) {
            Configuration parent = (Configuration) iterator.next();
View Full Code Here

        private void updateConfs(String callerConf, String[] dependencyConfs) {
            String[] prevDepConfs = (String[]) confs.get(callerConf);
            if (prevDepConfs != null) {
                Set newDepConfs = new HashSet(Arrays.asList(prevDepConfs));
                newDepConfs.addAll(Arrays.asList(dependencyConfs));
                confs.put(callerConf, newDepConfs.toArray(new String[newDepConfs.size()]));
            } else {
                confs.put(callerConf, dependencyConfs);
            }
        }
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.