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