Package java.util

Examples of java.util.TreeSet.toArray()


    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

          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)
View Full Code Here

              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);
View Full Code Here

        continue;
      }

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

  public long getName()
  {
View Full Code Here

            if (name.length() > 0) {
                set.add(name);
            }
        }

        String[] locales = (String[]) set.toArray(new String[set.size()]);
        return locales.length == 0 ? null : locales;
    }

    /**
     * Returns the ObjectClassDefinition for a given Pid/Locale.
View Full Code Here

                for (int j=0; j<files.length; j++) {
                    sortedSet.add(files[j]);
                }
                int count = 0;
                ThemeResource[] sortedResources =
                   (ThemeResource[])sortedSet.toArray(new ThemeResource[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

    } 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

          continue;
        }
        names.add(propName);
      }

      return (String[]) names.toArray(new String[names.size()]);
    }

    public Properties toProperties() throws IllegalAccessException,
        InvocationTargetException, ClassNotFoundException {
      Properties props = new Properties();
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.