Package java.util

Examples of java.util.SortedSet.toArray()


            supertypes = new Name[] { names[0] };
        } else {
            // Sort and remove duplicates
            SortedSet types = new TreeSet();
            types.addAll(Arrays.asList(names));
            supertypes = (Name[]) types.toArray(new Name[types.size()]);
        }
    }

    /**
     * Sets the mixin flag.
View Full Code Here


    //  Used to generate IdentityLineIDMap  ??????
    public Integer[] getArrayOfLineIDs()
    {
        SortedSet lineIDset = this.getSetOfPrimitiveLineIDs();
        Integer[] lineIDary = new Integer[ lineIDset.size() ];
        lineIDset.toArray( lineIDary );
        return lineIDary;
    }

    /*
        setStartPrimitive()/setFinalPrimitive()
View Full Code Here

                for (MediaFile mf : files) {
                    sortedSet.add(mf);
                }
                int count = 0;
                MediaFile[] sortedResources =
                   (MediaFile[])sortedSet.toArray(new MediaFile[sortedSet.size()]);
                List atomEntries = new ArrayList();
                for (int i=start; i<(start + max) && i<(sortedResources.length); i++) {
                    Entry entry = createAtomResourceEntry(website, sortedResources[i]);
                    atomEntries.add(entry);
                    if (count == 0) {
View Full Code Here

                        handlerContext));
            } catch (Exception ex) {
                log.error("Omitting handler", ex);
            }
        }
        return (HandlerDescriptor[]) handlerDescriptorSet
                .toArray(new HandlerDescriptor[handlerDescriptorSet.size()]);
    }

    public void handle(final Request request, final Response response,
            final HandlerChain handlerChain) throws HandlerException {
View Full Code Here

                handlerDescriptorSet.add(new HandlerDescriptor(current, this));
            } catch (Exception ex) {
                log.error("Omitting handler", ex);
            }
        }
        return (HandlerDescriptor[]) handlerDescriptorSet
                .toArray(new HandlerDescriptor[handlerDescriptorSet.size()]);
    }

    /*
     * (non-Javadoc)
 
View Full Code Here

        if (secondAttempt) {
            lookupParams.removeAll(DEFAULT_ACTION_PARAMS);
            lookupParams.addAll(DEFAULT_ACTION_PARAMS);
        }

        UrlMappingKey[] mappingKeys = (UrlMappingKey[]) mappingKeysSet.toArray(new UrlMappingKey[mappingKeysSet.size()]);
        for (int i = mappingKeys.length; i > 0; i--) {
            UrlMappingKey mappingKey = mappingKeys[i - 1];
            if (lookupParams.containsAll(mappingKey.paramNames)) {
                final UrlMapping mapping = mappingsLookup.get(mappingKey);
                if (canInferAction(actionName, secondAttempt, isIndexAction, mapping)) {
View Full Code Here

            if (files[i].isFile()) {
                names.add(files[i].getName());
            }
        }

        return (String[])names.toArray(new String[names.size()]);
    }
   
    /**
     * Retrieves names of directories available in the repository
     * @return array of directory names
View Full Code Here

            if (files[i].isDirectory()) {
                names.add(files[i].getName());
            }
        }

        return (String[])names.toArray(new String[names.size()]);
    }
}
View Full Code Here

                                       Modifier.isPublic(mods));
         m.add(vma);
      }

      members = new ValueMemberAnalysis[m.size()];
      members = (ValueMemberAnalysis[])m.toArray(members);
      logger.debug("ValueAnalysis(\""+cls.getName()+"\") value member count: "
                   + members.length);
     
      // Get superclass analysis
      Class superClass = cls.getSuperclass();
View Full Code Here

                    for (int i=0; i<files.length; i++) {
                        sortedSet.add(files[i]);
                    }
                }
                int count = 0;
                WeblogResource[] sortedArray = (WeblogResource[])sortedSet.toArray(new WeblogResource[sortedSet.size()]);
                for (int i=start; i<(start + max) && i<(sortedArray.length); i++) {
                    Entry entry = createAtomResourceEntry(website, sortedArray[i]);
                    atomEntries.add(entry);
                    if (count == 0) {
                        // first entry is most recent
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.