Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.util.collection
Class ReverseListIterator

    java.lang.Object
      org.jboss.util.collection.ReverseListIterator

All Implemented Interfaces:
  Iterator

public class ReverseListIterator
extends Object
implements Iterator

An iterator that returns elements in reverse order from a list.

Version:
  `$Revision: 1.1 $`
Author:
  Jason Dillon

Field Summary
`protected int` | `current` The current index of the list
`protected List` | `list` The list to get elements from

Constructor Summary
`ReverseListIterator(List list)` Construct a ReverseListIterator for the given list.

Method Summary
`boolean` | `hasNext()` Check if there are more elements.
`Object` | `next()` Get the next element.
`void` | `remove()` Remove the current element.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### list

    protected final List list

  The list to get elements from

### current

    protected int current

  The current index of the list

Constructor Detail

### ReverseListIterator

    public ReverseListIterator(List list)

  Construct a ReverseListIterator for the given list.

Parameters:
  `list` - List to iterate over.

Method Detail

### hasNext

    public boolean hasNext()

  Check if there are more elements.

  Specified by:
    `hasNext` in interface `Iterator`
  Returns:
    True if there are more elements.

### next

    public Object next()

  Get the next element.

  Specified by:
    `next` in interface `Iterator`
  Returns:
    The next element.
  Throws:
    `NoSuchElementException`

### remove

    public void remove()

  Remove the current element.

  Specified by:
    `remove` in interface `Iterator`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.