Package java.util

Examples of java.util.LinkedHashSet.toArray()


        }
      }     
    }
   
    String[] result = new String[allFiles.size()];
    allFiles.toArray(result);
    return result;
  }
 
  // trick to detect default platform charset
  private static final Charset DEFAULT_PLATFORM_CHARSET =
View Full Code Here


            referencedEntriesSet.add(referencedEntries[index]);
          }
        }
        if (referencedEntriesSet.size() > 0) {
          result.referencedEntries = new IClasspathEntry[referencedEntriesSet.size()];
          referencedEntriesSet.toArray(result.referencedEntries);
        }
      }
    }
   
    int length = rawClasspath.length;
View Full Code Here

        for (int i = 0; i < schemas.length; i++) {
            Table[] ts = schemas[i].getTables();
            for (int j = 0; j < ts.length; j++)
                tables.add(ts[j]);
        }
        Table[] tableArray = (Table[]) tables.toArray(new Table[tables.size()]);
        String[] sql = _conf.getDBDictionaryInstance()
            .getDeleteTableContentsSQL(tableArray);
        if (!executeSQL(sql))
            _log.warn(_loc.get("delete-table-contents"));
    }
View Full Code Here

                    }
                }
                if (clear != null)
                    independent.removeAll(clear);

                _assignMaps = (ClassMapping[]) independent.toArray
                    (new ClassMapping[independent.size()]);
            }
        }
        return _assignMaps;
    }
View Full Code Here

            String[] ruleConfs = rule.getConfigurations();
            if (containsAny(ruleConfs, moduleConfigurations)) {
                rules.add(rule);
            }
        }
        return (ExcludeRule[]) rules.toArray(new ExcludeRule[rules.size()]);
    }

    private boolean containsAny(String[] arr1, String[] arr2) {
        return new ArrayList(Arrays.asList(arr1)).removeAll(Arrays.asList(arr2));
    }
View Full Code Here

        addAllIfNotNull(req, usage.getRequiredConfigurations(in, inConf));
        for (Iterator iterator = mergedUsages.values().iterator(); iterator.hasNext();) {
            IvyNodeUsage usage = (IvyNodeUsage) iterator.next();
            addAllIfNotNull(req, usage.getRequiredConfigurations(in, inConf));
        }
        return req == null ? new String[0] : (String[]) req.toArray(new String[req.size()]);
    }

    private void addAllIfNotNull(Collection into, Collection col) {
        if (col != null) {
            into.addAll(col);
View Full Code Here

        addAllIfNotNull(depConfs, usage.getConfigurations(rootModuleConf));
        for (Iterator iterator = mergedUsages.values().iterator(); iterator.hasNext();) {
            IvyNodeUsage usage = (IvyNodeUsage) iterator.next();
            addAllIfNotNull(depConfs, usage.getConfigurations(rootModuleConf));
        }
        return (String[]) depConfs.toArray(new String[depConfs.size()]);
    }
   
    protected boolean isConfRequiredByMergedUsageOnly(String rootModuleConf, String conf) {
        Set confs = usage.getConfigurations(rootModuleConf);
        return confs == null || !confs.contains(conf);
View Full Code Here

            confs.addAll(Arrays.asList(getDependencyConfigurations(moduleConfigurations[i])));
        }
        if (confs.contains("*")) {
            return new String[] {"*"};
        }
        return (String[]) confs.toArray(new String[confs.size()]);
    }

    public DependencyArtifactDescriptor[] getDependencyArtifacts(String moduleConfiguration) {
        Collection artifacts = getCollectionForConfiguration(moduleConfiguration,
            dependencyArtifacts);
View Full Code Here

    public IncludeRule[] getIncludeRules(String[] moduleConfigurations) {
        Set rules = new LinkedHashSet();
        for (int i = 0; i < moduleConfigurations.length; i++) {
            rules.addAll(Arrays.asList(getIncludeRules(moduleConfigurations[i])));
        }
        return (IncludeRule[]) rules.toArray(new IncludeRule[rules.size()]);
    }

    public ExcludeRule[] getExcludeRules(String[] moduleConfigurations) {
        Set rules = new LinkedHashSet();
        for (int i = 0; i < moduleConfigurations.length; i++) {
View Full Code Here

    public ExcludeRule[] getExcludeRules(String[] moduleConfigurations) {
        Set rules = new LinkedHashSet();
        for (int i = 0; i < moduleConfigurations.length; i++) {
            rules.addAll(Arrays.asList(getExcludeRules(moduleConfigurations[i])));
        }
        return (ExcludeRule[]) rules.toArray(new ExcludeRule[rules.size()]);
    }

    public DependencyArtifactDescriptor[] getAllDependencyArtifacts() {
        if (dependencyArtifacts == null) {
            return new DependencyArtifactDescriptor[0];
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.