Package java.util

Examples of java.util.TreeSet.toArray()


            String usecase = (String) i.next();
            if (this.usecase2event.get(usecase).equals(event)) {
                usecases.add(usecase);
            }
        }
        return (String[]) usecases.toArray(new String[usecases.size()]);
    }

    public String getEvent(String usecase) {
        return (String) this.usecase2event.get(usecase);
    }
View Full Code Here


        Set mustAttrSet = new TreeSet();
        for ( int i = 0; i < this.objectClassNames.length; i++ )
        {
            this.fetchMust( this.objectClassNames[i], mustAttrSet );
        }
        return ( String[] ) mustAttrSet.toArray( new String[0] );
    }


    /**
     * Returns the must attribute types of this and all super object
View Full Code Here

        Set mayAttrSet = new TreeSet();
        for ( int i = 0; i < this.objectClassNames.length; i++ )
        {
            this.fetchMay( this.objectClassNames[i], mayAttrSet );
        }
        return ( String[] ) mayAttrSet.toArray( new String[0] );
    }


    /**
     * Returns the may attribute types of this and all super object classes.
View Full Code Here

            Enumeration resources = (Enumeration) AccessController.doPrivileged(
                J2DoPrivHelper.getResourcesAction(loader, PREFIX + serviceName));
            while (resources.hasMoreElements())
                addResources((URL) resources.nextElement(), resourceList);

            return (String[]) resourceList.toArray(new String[resourceList
                .size()]);
        } catch (Exception e) {
            // silently swallow all exceptions.
            return new String[0];
        }
View Full Code Here

                if (!aliases.contains(impls[i]))
                    allowed.add(impls[i]);
        } catch (Throwable t) {
        }
        if (!allowed.isEmpty())
            pd.setValue(ATTRIBUTE_ALLOWED_VALUES, (String[]) allowed.toArray
                (new String[allowed.size()]));

        return pd;
    }
View Full Code Here

        }
        return (first < second) ? -1 : 1;
      }
    });
    bootOrder.addAll(bootKeys);
    return Arrays.asList(bootOrder.toArray(new String[bootOrder.size()]));
  }

  /**
   * Returns a list of default extension jars that should be placed on the
   * build path and runtime classpath, by default.
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

        continue;
      }

      retvalCollector.add(name.getName());
    }
    return (String[]) retvalCollector.toArray
            (new String[retvalCollector.size()]);
  }

  public long getName()
  {
View Full Code Here

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

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

      if (size > 0) {
        String[] syns = new String[size];
        if (size == 1
          syns[0] = (String) synonyms.first();
        else
          synonyms.toArray(syns);
//        if (syns.length > 1) Arrays.sort(syns);
//        if (DEBUG) System.err.println("word=" + word + ":" + Arrays.asList(syns));
        word2Syns.put(word, syns);
      }
    }
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.