Package java.util

Examples of java.util.Set.toArray()


        }
    }
   
    private String [] getStringArray(Map categories) {
        Set allCategories = categories.keySet();
        return (String[]) allCategories.toArray(new String[0]);
    }


  public Configuration load(String configurationName, ConfigurationParser parser) throws ConfigurationManagerException {
    throw new ConfigurationManagerException("Using a specific parser with this handler is not supported");
View Full Code Here


        }
    }
   
    public synchronized String[] getPoolNames(){
        Set names = _pools.keySet();
        return (String[]) names.toArray(new String[names.size()]);
    }

    public boolean acceptsURL(String url) throws SQLException {
        try {
            return url.startsWith(URL_PREFIX);
View Full Code Here

                if (!validated)
                {
                    // Why is this wrapping all exceptions into 1 single exception?
                    // This needs coordinating with the test expectations in the enhancer unit tests.
                    throw new NucleusUserException(LOCALISER_API.msg("019016", obj_cls.getName()),
                        (Throwable[]) errors.toArray(new Throwable[errors.size()]));
                }
            }
        }
    }
View Full Code Here

                }
                throw new Error( "Unable to find unambiguously defined class '" + className + "', candidates are: [" + sb.toString( ) + "]" );
            }
            else if ( validClazzCandidates.size( ) == 1 )
            {
                clazz = (Class) validClazzCandidates.toArray( )[0];
            }
            else
            {
                clazz = null;
            }
View Full Code Here

          + dicNameRelativeDicHome + ".dic", charsetName, maxWordLen);
    } catch (IOException e) {
      throw toRuntimeException(e);
    }
    Set/* <Word> */set = (Set/* <Word> */) dics.get(dicNameRelativeDicHome);
    Word[] words = (Word[]) set.toArray(new Word[set.size()]);
    Arrays.sort(words);
    return words;
  }

  // -------------------------------------
View Full Code Here

    return (char[][])this.originalTypes.get(typeRef);
  }
 
  private QualifiedTypeReference[] getSubstituedTypes() {
    Set types = this.substituedTypes.keySet();
    return (QualifiedTypeReference[]) types.toArray(new QualifiedTypeReference[types.size()]);
  }
 
  private char[][][] getSubstitution(TypeReference typeRef) {
    return (char[][][])this.substituedTypes.get(typeRef);
  }
View Full Code Here

     */
    public void logOptions(Map options) {
      if ((this.tagBits & Logger.XML) != 0) {
        this.printTag(Logger.OPTIONS, null, true, false);
        final Set entriesSet = options.entrySet();
        Object[] entries = entriesSet.toArray();
        Arrays.sort(entries, new Comparator() {
          public int compare(Object o1, Object o2) {
            Map.Entry entry1 = (Map.Entry) o1;
            Map.Entry entry2 = (Map.Entry) o2;
            return ((String) entry1.getKey()).compareTo((String) entry2.getKey());
View Full Code Here

                        all.add(exx);
                    }
                }
            }

            return (Class[]) all.toArray(new Class[all.size()]);
        }

        public boolean generateProxyMethod() {
            return !isFinal() && !isPrivate();
        }
View Full Code Here

   * Returns the names of all defined user libraries. The corresponding classpath container path
   * is the name appended to the CONTAINER_ID. 
   */
  public synchronized String[] getUserLibraryNames() {
    Set set = this.userLibraries.keySet();
    return (String[]) set.toArray(new String[set.size()]);
  }
 
  private void initialize() {
    this.userLibraries = new HashMap();
    IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
View Full Code Here

            desc.addDependencies(pending);
        }

        Class[] classes = new Class[pending.size()];
        pending.toArray(classes);

        for (int i = 0; i < classes.length; i++) {

            if (!java.rmi.Remote.class.isAssignableFrom(classes[i])) {
                continue;
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.