16 package uk.ac.cam.eng.extraction.hadoop.datatypes;
18 import java.io.DataInput;
19 import java.io.DataOutput;
20 import java.io.IOException;
21 import java.util.ArrayList;
23 import org.apache.hadoop.io.Writable;
24 import org.apache.hadoop.io.WritableUtils;
39 ArrayList<Pair<RuleString, RuleData>> implements Writable {
41 private static final long serialVersionUID = 1L;
44 public void write(DataOutput out)
throws IOException {
45 WritableUtils.writeVInt(out, size());
53 public void readFields(DataInput in)
throws IOException {
55 int size = WritableUtils.readVInt(in);
56 for (
int i = 0; i < size; ++i) {
57 RuleString target =
new RuleString();
58 target.readFields(in);
static< F, S > Pair< F, S > createPair(F first, S second)