609 |
|
} |
610 |
|
} |
611 |
|
|
612 |
+ |
/** |
613 |
+ |
* This class is nearly a mirror-image of DeqIterator, using tail |
614 |
+ |
* instead of head for initial cursor, and head instead of tail |
615 |
+ |
* for fence. |
616 |
+ |
*/ |
617 |
|
private class DescendingIterator implements Iterator<E> { |
613 |
– |
/* |
614 |
– |
* This class is nearly a mirror-image of DeqIterator, using |
615 |
– |
* tail instead of head for initial cursor, and head instead of |
616 |
– |
* tail for fence. |
617 |
– |
*/ |
618 |
|
private int cursor = tail; |
619 |
|
private int fence = head; |
620 |
|
private int lastRet = -1; |