SplitHistory implements Comparable<SplitHistory>, Serializable { @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append(PATH_OPEN); for (int i = 0; i < entries.size() - 1; i++) { buf.append(entries.get(i)); buf.append(PATH_SEP); } buf.append(entries.get(entries.size() - 1)); buf.append(PATH_CLOSE); return buf.toString(); } SplitHistory();  SplitHistory(int initialCapacity); private  SplitHistory(boolean addRoot); private  SplitHistory(int initialCapacity, boolean addRoot); int size(); List<SplitHistoryEntry> entries(); int[] indexPath(); String indexPathString(); SplitHistory[] split(int num); SplitHistory split(int index, boolean last); @Override int compareTo(SplitHistory history); boolean isPredecessor(SplitHistory history); boolean isSuccessor(SplitHistory history); boolean isFirstUpTo(int level); boolean isLastUpTo(int level); boolean isFirst(); boolean isLast(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static SplitHistory parse(String history); static final SplitHistory ROOT; }
@Test public void testToString() { assertEquals("[(0L)]", history.toString()); assertEquals("[(0L),(0)]", historySplit[0].toString()); assertEquals("[(0L),(1)]", historySplit[1].toString()); assertEquals("[(0L),(2L)]", historySplit[2].toString()); }