SplitHistory implements Comparable<SplitHistory>, Serializable { public boolean isLast() { return isLastUpTo(0); } 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 testIsLast() { String p = "[(0/1),(0/2),(2/3)]"; assertFalse((SplitHistory.parse(p).isLast())); p = "[(0/1),(1/2),(2/3)]"; assertTrue((SplitHistory.parse(p).isLast())); p = "[(0/1)]"; assertTrue((SplitHistory.parse(p).isLast())); }