@Test public void testLength() { assertEquals("Length of the new sequence not zero", 0, seq.length()); seq.append("a"); assertEquals("Length after 1 append not 1", 1, seq.length()); seq.prepend("b"); assertEquals("Length after 2 appends not 2", 2, seq.length()); seq.last(); seq.last(); assertEquals("Length after removing 2 things from a 2 element seq not zero", 0, seq.length()); }
@Override public int length() { return fillCount; }
CircularArraySequence implements Sequence { @Override public int length() { return fillCount; } }
CircularArraySequence implements Sequence { @Override public int length() { return fillCount; } CircularArraySequence(int size);  CircularArraySequence(CircularArraySequence<T> seq); }
CircularArraySequence implements Sequence { @Override public int length() { return fillCount; } CircularArraySequence(int size);  CircularArraySequence(CircularArraySequence<T> seq); @Override Object head(); @Override Object last(); @Override Sequence front(); @Override Sequence tail(); @Override Sequence<T> concat(Sequence seq); @Override boolean contains(Sequence subseq); @Override boolean contains(Object element); @Override void append(Object element); @Override void prepend(Object element); @Override boolean isEmpty(); @Override Object peekHead(); @Override Object peekLast(); @Override boolean equals(Sequence seq); @Override int length(); @Override Iterator<T> iterator(); String toString(); }
CircularArraySequence implements Sequence { @Override public int length() { return fillCount; } CircularArraySequence(int size);  CircularArraySequence(CircularArraySequence<T> seq); @Override Object head(); @Override Object last(); @Override Sequence front(); @Override Sequence tail(); @Override Sequence<T> concat(Sequence seq); @Override boolean contains(Sequence subseq); @Override boolean contains(Object element); @Override void append(Object element); @Override void prepend(Object element); @Override boolean isEmpty(); @Override Object peekHead(); @Override Object peekLast(); @Override boolean equals(Sequence seq); @Override int length(); @Override Iterator<T> iterator(); String toString();  }