start of new file
[IRC.git] / Robust / src / Benchmarks / Scheduling / MapReduce / OutputCollector.java
1 public class OutputCollector {
2
3     Vector keys;
4     Vector values;
5
6     public OutputCollector() {
7         this.keys = new Vector();
8         this.values = new Vector();
9     }
10
11     public void emit(String key, String value) {
12         this.keys.addElement(key);
13         this.values.addElement(value);
14     }
15
16     public int size() {
17         return this.keys.size();
18     }
19
20     public String getKey(int i) {
21         return (String)this.keys.elementAt(i);
22     }
23
24     public String getValue(int i) {
25         return (String)this.values.elementAt(i);
26     }
27 }