Package java.util

Examples of java.util.LinkedHashSet.toArray()


        }
        if ( entry.isReferral() )
        {
            raSet.add( IAttribute.REFERRAL_ATTRIBUTE );
        }
        returningAttributes = ( String[] ) raSet.toArray( new String[raSet.size()] );

        initializeAttributes( entry, returningAttributes, monitor );
    }

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

                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
            return (Artifact[]) intersectedArtifacts.toArray(new Artifact[intersectedArtifacts
                    .size()]);
        } else if (c instanceof ConfigurationGroup) {
            ConfigurationGroup group = (ConfigurationGroup) c;
            String[] members = group.getMembersConfigurationNames();
            Set/* <Artifact> */groupArtifacts = new LinkedHashSet();
View Full Code Here

                groupArtifacts.addAll(getArtifactsIncludingExtending(members[i]));
            }
            if (artifacts != null) {
                groupArtifacts.addAll(artifacts);
            }
            return (Artifact[]) groupArtifacts.toArray(new Artifact[groupArtifacts.size()]);
        } else {
            if (artifacts == null) {
                return new Artifact[0];
            } else {
                return (Artifact[]) artifacts.toArray(new Artifact[artifacts.size()]);
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

            List sortedDependencies = sortEngine.sortNodes(dependencies, SortOptions.SILENT);
            Collections.reverse(sortedDependencies);
   
            handleTransiviteEviction(md, confs, data, sortedDependencies);   
           
            return (IvyNode[]) dependencies.toArray(new IvyNode[dependencies.size()]);
        } finally {
            IvyContext.popContext();
        }
    }
View Full Code Here

            }
            for ( int i = 0; i < this.getSelectedBookmarks().length; i++ )
            {
                entriesSet.add( this.getSelectedBookmarks()[i].getEntry() );
            }
            return ( IEntry[] ) entriesSet.toArray( new IEntry[entriesSet.size()] );
        }
        else
        {
            return null;
        }
View Full Code Here

            }
            for ( int i = 0; i < this.getSelectedValues().length; i++ )
            {
                valuesSet.add( this.getSelectedValues()[i] );
            }
            return ( IValue[] ) valuesSet.toArray( new IValue[valuesSet.size()] );
        }
        else
        {
            return null;
        }
View Full Code Here

            directories.addAll( mainDirectories );
            directories.addAll( testDirectories );
        }
        if ( ajdt )
            extractAspectDirs( directories, project, basedir, projectBaseDir, 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

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.