Package java.util

Examples of java.util.SortedSet.toArray()


                    SortedSet set = new TreeSet();
                    RecordSet rs = context.getFiler().getRecordSet();
                    while (rs.hasMoreRecords()) {
                        set.add(rs.getNextKey());
                    }
                    keySet = (Key[]) set.toArray(EMPTY_KEYS);
                }

                return new ResultSet(context, pr, keySet, query, parameters);
            } catch (Exception e) {
                if (e instanceof QueryException) {
View Full Code Here


                            SortedSet set = new TreeSet();
                            RecordSet rs = context.getFiler().getRecordSet();
                            while (rs.hasMoreRecords()) {
                                set.add(rs.getNextKey());
                            }
                            ks.add(set.toArray(EMPTY_KEYS));
                        } else {
                            // Try to use a NameIndex to resolve the path component
                            IndexPattern pattern = new IndexPattern(symbols, name, nsMap);
                            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODENAME, pattern);
                            if (idx != null) {
View Full Code Here

    public static Key[] getUniqueKeys(IndexMatch[] matches) {
        SortedSet set = new TreeSet();
        for (int i = 0; i < matches.length; i++) {
            set.add(matches[i].getKey());
        }
        return (Key[]) set.toArray(EmptyKeys);
    }

    /**
     * andKeySets takes several sets of unique Keys and returns the
     * ANDed set (elements that exist in all sets).  The first dimension
View Full Code Here

            if (!eq) {
                highs.clear();
            }
        }

        return (Key[]) set.toArray(EmptyKeys);
    }

    /**
     * orKeySets takes several sets of unique Keys and returns the
     * ORed set (all unique elements).  The first dimension of the
View Full Code Here

            for (int j = 0; j < keySets[i].length; j++) {
                set.add(keySets[i][j]);
            }
        }

        return (Key[]) set.toArray(EmptyKeys);
    }

    /**
     * normalizeString normalizes the specific String by stripping
     * all leading, trailing, and continuous runs of white space.
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

        this.possibleLangToCountriesMap = new HashMap();
        for ( Iterator it = languageToCountrySetMap.keySet().iterator(); it.hasNext(); )
        {
            String language = ( String ) it.next();
            SortedSet countrySet = ( SortedSet ) languageToCountrySetMap.get( language );
            String[] countries = ( String[] ) countrySet.toArray( new String[countrySet.size()] );
            this.possibleLangToCountriesMap.put( language, countries );
        }

        String attributeDescription = this.initialAttributeDescription;
        if ( attributeDescription == null )
View Full Code Here

            SortedSet childSet = (SortedSet) _urls.get(url);
            if (childSet == null)
                throw new IndexOutOfBoundsException(url + " has no children");
            if (index >= childSet.size())
                throw new IndexOutOfBoundsException(url + " has only " + childSet.size() + " children, not " + index);
            children = ((HttpUrl[]) childSet.toArray(NO_CHILDREN));
            _urlCache.put(url, children);
        }
        return children[index];
    }
   
View Full Code Here

        HttpUrl[] children = (HttpUrl[]) _urlCache.get(parent);
        if (children == null) {
            SortedSet childSet = (SortedSet) _urls.get(parent);
            if (childSet == null)
                throw new IndexOutOfBoundsException(url + " has no children");
            children = ((HttpUrl[]) childSet.toArray(NO_CHILDREN));
            _urlCache.put(parent, children);
        }
        return Arrays.binarySearch(children, url);
    }
   
View Full Code Here

    public static Key[] getUniqueKeys(IndexMatch[] matches) {
        SortedSet set = new TreeSet();
        for (int i = 0; i < matches.length; i++) {
            set.add(matches[i].getKey());
        }
        return (Key[]) set.toArray(EmptyKeys);
    }

    /**
     * andKeySets takes several sets of unique Keys and returns the
     * ANDed set (elements that exist in all sets).  The first dimension
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.