Package java.util

Examples of java.util.LinkedHashSet.toArray()


                }
                classpathUrls.add(file.toURI().toURL());
            }
        }
        final URLClassLoader loader =
            new URLClassLoader((URL[])classpathUrls.toArray(new URL[0]),
                Thread.currentThread().getContextClassLoader());
        Thread.currentThread().setContextClassLoader(loader);
    }
}
View Full Code Here


      }
      else
      {
        LinkedHashSet namesSet = new LinkedHashSet();
        collectPropertyNames(namesSet);
        names = (String[]) namesSet.toArray(new String[namesSet.size()]);
      }
    }
    else if (base != null)
    {
      names = base.getPropertyNames();
View Full Code Here

        names.add(cols.get(j).getLocalName());
      }
    }
   
    String[] columnNames = new String[names.size()];
    names.toArray(columnNames);
    return columnNames;
  }
 
  public String[] rowNames() {
    Elements rows = doc.getRootElement().getChildElements();
View Full Code Here

        }
      }     
    }
   
    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

            }
            filter.append( ")" ); //$NON-NLS-1$
        }
        else if ( filterSet.size() == 1 )
        {
            filter.append( filterSet.toArray()[0] );
        }

        return filter.toString();
    }
}
View Full Code Here

            Configuration parent = (Configuration) iterator.next();

            Environment parentEnvironment = parent.getEnvironment();
            nonOverridableSet.addAll(parentEnvironment.getNonOverrideableClasses());
        }
        String[] nonOverridableClasses = (String[]) nonOverridableSet.toArray(new String[nonOverridableSet.size()]);

        if (log.isDebugEnabled()) {
            StringBuffer buf = new StringBuffer("ClassLoader structure for configuration ").append(id).append("\n");
            buf.append("Parent configurations:\n");
            for (Iterator iterator = classParents.iterator(); iterator.hasNext();) {
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

                }
            }
            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

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.