Package java.util

Examples of java.util.TreeSet.toArray()


        } else {
            log.debug("Sending notification email only to weblog owner");
        }
       
        // Form array of commenter addrs
        String[] commenterAddrs = (String[])subscribers.toArray(new String[0]);
       
        //------------------------------------------
        // --- Form the messages to be sent -
        // Build separate owner and commenter (aka subscriber) messages
       
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

      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

            }
        } else {
            repos = createRepository(baseURL, null, null, pegRevision, sessionRevision, null);
        }
       
        String[] targetPaths = (String[]) targets.toArray(new String[targets.size()]);
       
        for (int i = 0; i < targetPaths.length; i++) {
            targetPaths[i] = SVNEncodingUtil.uriDecode(targetPaths[i]);
        }
View Full Code Here

            }
        } else {
            repos = createRepository(baseURL, null, null, pegRevision, sessionRevision, null);
        }
       
        String[] targetPaths = (String[]) targets.toArray(new String[targets.size()]);
       
        for (int i = 0; i < targetPaths.length; i++) {
            targetPaths[i] = SVNEncodingUtil.uriDecode(targetPaths[i]);
        }
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

                {
                    domains.add(domain);
                }
            }
        }
        return (String[])domains.toArray(new String[domains.size()]);
    }

    ///////////////////////////////
    //
    // Internal helper methods
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

          propertyType, propertyName, getterMethod, setterMethod);
        properties.add(property);
      }
    }

    ObjectModelPropertyDescriptor[] propertyArray = properties.toArray(new ObjectModelPropertyDescriptor[properties.size()]);
    return propertyArray;
  }
 
  private static Method getSetter(Class objectModelType, String propertyName, Class propertyType) {
    String prefix = "set"; //$NON-NLS-1$
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.