@Test public void testDescendingIterator() { deque.addLast(sequence); int index = sequence.size() - 1; for (Iterator<KTypeCursor<KType>> i = deque.descendingIterator(); i.hasNext(); ) { KTypeCursor<KType> cursor = i.next(); assertEquals2(sequence.buffer[index], cursor.value); assertEquals2(deque.buffer[cursor.index], cursor.value); index--; } assertEquals(-1, index); deque.clear(); assertFalse(deque.descendingIterator().hasNext()); }
public Iterator<KTypeCursor<KType>> descendingIterator() { return new DescendingValueIterator(); }
KTypeArrayDeque extends AbstractKTypeCollection<KType> implements KTypeDeque<KType>,
             Preallocable, 
             Cloneable,
             Accountable { public Iterator<KTypeCursor<KType>> descendingIterator() { return new DescendingValueIterator(); } }
KTypeArrayDeque extends AbstractKTypeCollection<KType> implements KTypeDeque<KType>,
             Preallocable, 
             Cloneable,
             Accountable { public Iterator<KTypeCursor<KType>> descendingIterator() { return new DescendingValueIterator(); } KTypeArrayDeque();  KTypeArrayDeque(int expectedElements);  KTypeArrayDeque(int expectedElements, ArraySizingStrategy resizer);  KTypeArrayDeque(KTypeContainer<? extends KType> container); }
KTypeArrayDeque extends AbstractKTypeCollection<KType> implements KTypeDeque<KType>,
             Preallocable, 
             Cloneable,
             Accountable { public Iterator<KTypeCursor<KType>> descendingIterator() { return new DescendingValueIterator(); } KTypeArrayDeque();  KTypeArrayDeque(int expectedElements);  KTypeArrayDeque(int expectedElements, ArraySizingStrategy resizer);  KTypeArrayDeque(KTypeContainer<? extends KType> container); @Override void addFirst(KType e1); @SafeVarargs /* #end */ final void addFirst(KType... elements); int addFirst(KTypeContainer<? extends KType> container); int addFirst(Iterable<? extends KTypeCursor<? extends KType>> iterable); @Override void addLast(KType e1); @SafeVarargs /* #end */ final void addLast(KType... elements); int addLast(KTypeContainer<? extends KType> container); int addLast(Iterable<? extends KTypeCursor<? extends KType>> iterable); @Override KType removeFirst(); @Override KType removeLast(); @Override KType getFirst(); @Override KType getLast(); @Override int removeFirst(KType e1); int bufferIndexOf(KType e1); @Override int removeLast(KType e1); int lastBufferIndexOf(KType e1); @Override int removeAll(KType e1); void removeAtBufferIndex(int index); @Override boolean isEmpty(); @Override int size(); @Override void clear(); void release(); @Override void ensureCapacity(int expectedElements); @Override /*! #if ($TemplateOptions.KTypePrimitive) KType [] toArray() #else !*/ Object [] toArray(); KType[] toArray(KType[] target); @Override KTypeArrayDeque<KType> clone(); @Override long ramBytesAllocated(); @Override long ramBytesUsed(); Iterator<KTypeCursor<KType>> iterator(); Iterator<KTypeCursor<KType>> descendingIterator(); @Override T forEach(T procedure); @Override T forEach(T predicate); @Override T descendingForEach(T procedure); @Override T descendingForEach(T predicate); @Override int removeAll(KTypePredicate<? super KType> predicate); @Override boolean contains(KType e); @Override int hashCode(); @Override boolean equals(Object obj); @SafeVarargs /* #end */ static KTypeArrayDeque<KType> from(KType... elements); }
KTypeArrayDeque extends AbstractKTypeCollection<KType> implements KTypeDeque<KType>,
             Preallocable, 
             Cloneable,
             Accountable { public Iterator<KTypeCursor<KType>> descendingIterator() { return new DescendingValueIterator(); } KTypeArrayDeque();  KTypeArrayDeque(int expectedElements);  KTypeArrayDeque(int expectedElements, ArraySizingStrategy resizer);  KTypeArrayDeque(KTypeContainer<? extends KType> container); @Override void addFirst(KType e1); @SafeVarargs /* #end */ final void addFirst(KType... elements); int addFirst(KTypeContainer<? extends KType> container); int addFirst(Iterable<? extends KTypeCursor<? extends KType>> iterable); @Override void addLast(KType e1); @SafeVarargs /* #end */ final void addLast(KType... elements); int addLast(KTypeContainer<? extends KType> container); int addLast(Iterable<? extends KTypeCursor<? extends KType>> iterable); @Override KType removeFirst(); @Override KType removeLast(); @Override KType getFirst(); @Override KType getLast(); @Override int removeFirst(KType e1); int bufferIndexOf(KType e1); @Override int removeLast(KType e1); int lastBufferIndexOf(KType e1); @Override int removeAll(KType e1); void removeAtBufferIndex(int index); @Override boolean isEmpty(); @Override int size(); @Override void clear(); void release(); @Override void ensureCapacity(int expectedElements); @Override /*! #if ($TemplateOptions.KTypePrimitive) KType [] toArray() #else !*/ Object [] toArray(); KType[] toArray(KType[] target); @Override KTypeArrayDeque<KType> clone(); @Override long ramBytesAllocated(); @Override long ramBytesUsed(); Iterator<KTypeCursor<KType>> iterator(); Iterator<KTypeCursor<KType>> descendingIterator(); @Override T forEach(T procedure); @Override T forEach(T predicate); @Override T descendingForEach(T procedure); @Override T descendingForEach(T predicate); @Override int removeAll(KTypePredicate<? super KType> predicate); @Override boolean contains(KType e); @Override int hashCode(); @Override boolean equals(Object obj); @SafeVarargs /* #end */ static KTypeArrayDeque<KType> from(KType... elements); public Object [] buffer; public int head; public int tail; }