Package java.util.Map

Examples of java.util.Map.Entry


        }

        Map extraInfo = md.getExtraInfo();
        Iterator it = extraInfo.entrySet().iterator();
        while (it.hasNext()) {
            Entry entry = (Entry) it.next();
            newMd.addExtraInfo((String) entry.getKey(), (String) entry.getValue());
        }

        License[] licenses = md.getLicenses();
        for (int k = 0; k < licenses.length; k++) {
            newMd.addLicense(licenses[k]);
View Full Code Here


   */
  public ArrayList<Entry> generateKeyValPairs(Object key, Object val) {
    ArrayList<Entry> retv = new ArrayList<Entry>();
    String countType = LONG_VALUE_SUM;
    String id = "record_count";
    Entry e = generateEntry(countType, id, ONE);
    if (e != null) {
      retv.add(e);
    }
    if (this.inputFile != null) {
      e = generateEntry(countType, this.inputFile, ONE);
View Full Code Here

    Iterator iter = this.aggregatorDescriptorList.iterator();
    while (iter.hasNext()) {
      ValueAggregatorDescriptor ad = (ValueAggregatorDescriptor) iter.next();
      Iterator<Entry> ens = ad.generateKeyValPairs(key, value).iterator();
      while (ens.hasNext()) {
        Entry en = ens.next();
        output.collect((WritableComparable) en.getKey(), (Writable) en
                       .getValue());
      }
    }
  }
View Full Code Here

   */
  public String getReportDetails() {
    StringBuffer sb = new StringBuffer();
    Iterator iter = items.entrySet().iterator();
    while (iter.hasNext()) {
      Entry en = (Entry) iter.next();
      Object val = en.getKey();
      Long count = (Long) en.getValue();
      sb.append("\t").append(val.toString()).append("\t").append(
                                                                 count.longValue()).append("\n");
    }
    return sb.toString();
  }
View Full Code Here

  public ArrayList getCombinerOutput() {
    ArrayList<String> retv = new ArrayList<String>();
    Iterator iter = items.entrySet().iterator();

    while (iter.hasNext()) {
      Entry en = (Entry) iter.next();
      Object val = en.getKey();
      Long count = (Long) en.getValue();
      retv.add(val.toString() + "\t" + count.longValue());
    }
    return retv;
  }
View Full Code Here

  public ArrayList<Entry> generateKeyValPairs(Object key, Object val) {
    String words[] = val.toString().split(" |\t");
    ArrayList<Entry> retv = new ArrayList<Entry>();
    for (int i = 0; i < words.length; i++) {
      Text valCount = new Text(words[i] + "\t" + "1");
      Entry en = generateEntry(VALUE_HISTOGRAM, "WORD_HISTOGRAM",
                               valCount);
      retv.add(en);
    }
    return retv;
  }
View Full Code Here

    ArrayList<Entry> retv = new ArrayList<Entry>();
    String [] words = val.toString().split(" ");
   
    String countType;
    String id;
    Entry e;
   
    for (String word: words) {
      long numVal = Long.parseLong(word);
      countType = LONG_VALUE_SUM;
      id = "count_" + word;
View Full Code Here

        if (con != null) {
            if (collective) {
                Map images = con.getImages();
                Iterator iter = images.entrySet().iterator();
                while (iter.hasNext()) {
                    Entry entry = (Entry)iter.next();
                    refStore.put(entry.getKey(),
                            wrapInReference(entry.getValue(), entry.getKey()));
                }
            }
            contextStore.remove(context);
        }
        //House-keeping (remove cleared references)
View Full Code Here

     */
    public synchronized List/*<TestResult>*/ run() {
        List/*<TestResult>*/ results = new ArrayList/*<TestResult>*/(m_suites.size());
        Iterator/*<Entry<Bundle, List<Class>>>*/ it = m_suites.entrySet().iterator();
        while (it.hasNext()) {
            Entry/*<Bundle, List<Class>>*/ entry = (Entry) it.next();
            Bundle bundle = (Bundle) entry.getKey();
            List/*<Class>*/ list = (List) m_suites.get(bundle);
            for (int i = 0; i < list.size(); i++) {
                Test test = createTestFromClass((Class) list.get(i), bundle);
                TestResult tr = doRun(test);
                results.add(tr);
View Full Code Here

     */
    public synchronized List/*<Test>*/ getTests() {
        List/*<Test>*/ results = new ArrayList/*<Test>*/();
        Iterator/*<Entry<Bundle, List<Class>>>*/ it = m_suites.entrySet().iterator();
        while (it.hasNext()) {
            Entry/*<Bundle, List<Class>>*/ entry = (Entry) it.next();
            Bundle bundle = (Bundle) entry.getKey();
            List/*<Class>*/ list = (List) m_suites.get(bundle);
            for (int i = 0; i < list.size(); i++) {
                Test test = createTestFromClass((Class) list.get(i), bundle);
                results.add(test);
            }
View Full Code Here

TOP

Related Classes of java.util.Map.Entry

Copyright © 2018 www.massapicom. 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.