Package java.util

Examples of java.util.LinkedHashSet.toArray()


        LinkedHashSet set = new LinkedHashSet();
        for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
            ListableRepository repository = (ListableRepository) iterator.next();
            set.addAll(repository.list(artifact));
        }
        return (Artifact[]) set.toArray(new Artifact[set.size()]);
    }

    public LinkedHashSet resolveInClassLoader(Collection artifacts) throws MissingDependencyException {
        return resolveInClassLoader(artifacts, Collections.EMPTY_SET);
    }
View Full Code Here


    Set result = new LinkedHashSet(16);
    while (resourceUrls.hasMoreElements()) {
      URL url = (URL) resourceUrls.nextElement();
      result.add(convertClassLoaderURL(url));
    }
    return (Resource[]) result.toArray(new Resource[result.size()]);
  }

  /**
   * Convert the given URL as returned from the ClassLoader into a Resource object.
   * <p>The default implementation simply creates a UrlResource instance.
View Full Code Here

      }
    }
    if (logger.isDebugEnabled()) {
      logger.debug("Resolved location pattern [" + locationPattern + "] to resources " + result);
    }
    return (Resource[]) result.toArray(new Resource[result.size()]);
  }

  /**
   * Determine the root directory for the given location.
   * <p>Used for determining the starting point for file matching,
View Full Code Here

                }
            }

            if ( !internalDnSet.isEmpty() )
            {
                dnsList.add( internalDnSet.toArray( new DN[internalDnSet.size()] ) );
                textList.add( "DNs of selected Attributes (" + internalDnSet.size() + " Entries)" );
            }
        }
        if ( searches.length == 1 && searches[0].getSearchResults() != null )
        {
View Full Code Here

            for ( int i = 0; i < srs.length; i++ )
            {
                internalDnSet.add( srs[i].getDn() );
            }

            dnsList.add( internalDnSet.toArray( new DN[internalDnSet.size()] ) );
            textList.add( "Search Results of '" + searches[0].getName() + "' (" + searches[0].getSearchResults().length
                + " Entries)" );
        }
        if ( entries.length + searchResults.length + bookmarks.length > 0 )
        {
View Full Code Here

            for ( int i = 0; i < bookmarks.length; i++ )
            {
                internalDnSet.add( bookmarks[i].getDn() );
            }

            dnsList.add( internalDnSet.toArray( new DN[internalDnSet.size()] ) );
            textList.add( "Selected Entries (" + internalDnSet.size() + " Entries)" );
        }

        this.initCurrentSelectionTexts = ( String[] ) textList.toArray( new String[textList.size()] );
        this.initCurrentSelectionDns = ( DN[][] ) dnsList.toArray( new DN[0][0] );
View Full Code Here

            }
            filter.append( ")" );
        }
        else if ( filterSet.size() == 1 )
        {
            filter.append( filterSet.toArray()[0] );
        }

        return filter.toString();
    }
}
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

            } else {
                newExtends.add(_extends[j]);
            }
        }
       
        this._extends = (String[]) newExtends.toArray(new String[newExtends.size()]);
    }
   
    private void addOther(Configuration[] allConfigs, Visibility visibility, Set configs) {
        for (int i = 0; i < allConfigs.length; i++) {
            String currentName = allConfigs[i].getName();
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.