Package java.util

Examples of java.util.SortedSet.toArray()


                if (allUsecases[i].indexOf("/") == -1) {
                    rootUsecases.add(allUsecases[i]);
                }
            }
           
            String[] usecases = (String[]) rootUsecases.toArray(new String[rootUsecases.size()]);
           
            setParameter("usecases", usecases);

            Role[] roles = getAccessController().getAccreditableManager().getRoleManager()
                    .getRoles();
View Full Code Here


            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

            ValueMemberType vma =
                new ValueMemberType(fields[i].getName(), fields[i].getType(), Modifier.isPublic(mods));
            m.add(vma);
        }
        members = new ValueMemberType[m.size()];
        members = (ValueMemberType[])m.toArray(members);
        // Get superclass analysis
        Class superClass = javaClass.getSuperclass();
        if (superClass == java.lang.Object.class)
            superClass = null;
        if (superClass == null)
View Full Code Here

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

        // Get superclass analysis
        Class superClass = cls.getSuperclass();
        if (superClass == java.lang.Object.class)
            superClass = null;
View Full Code Here

    for (int i = 0; i < fontDatas.length; i++)
    {
      set.add(fontDatas[i].getName());
    }
    String[] fonts = new String[set.size()];
    set.toArray(fonts);
    return fonts;
  }

  /**
   * Returns all font names for current system. NOTES: Java 1.4 only support
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.