@Test public void test() throws Exception{ TailIndexBuilder tib = new ArrayTailIndexBuilder(); tib.add(0, 0, 10); tib.add(1, 10, 15); TailIndex ti = tib.build(); Assert.assertEquals(0, ti.get(0)); Assert.assertEquals(10, ti.get(1)); }
@Override public int get(int nodeId) { return indexes[nodeId]; }
ArrayTailIndex implements Externalizable, TailIndex { @Override public int get(int nodeId) { return indexes[nodeId]; } }
ArrayTailIndex implements Externalizable, TailIndex { @Override public int get(int nodeId) { return indexes[nodeId]; } ArrayTailIndex();  ArrayTailIndex(int[] indexes); }
ArrayTailIndex implements Externalizable, TailIndex { @Override public int get(int nodeId) { return indexes[nodeId]; } ArrayTailIndex();  ArrayTailIndex(int[] indexes); @Override int size(); int[] getIndexes(); @Override int get(int nodeId); @Override void readExternal(ObjectInput in); @Override void writeExternal(ObjectOutput out); }
ArrayTailIndex implements Externalizable, TailIndex { @Override public int get(int nodeId) { return indexes[nodeId]; } ArrayTailIndex();  ArrayTailIndex(int[] indexes); @Override int size(); int[] getIndexes(); @Override int get(int nodeId); @Override void readExternal(ObjectInput in); @Override void writeExternal(ObjectOutput out);  }