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

## com.ibm.workplace.wcm.api
Interface DocumentIterator<T extends Document>

Type Parameters:
  `T` - The WCM API type

All Superinterfaces:
  java.util.Iterator<T>

    public interface DocumentIterator<T extends Document>

extends java.util.Iterator<T>

`DocumentIterator` iterates over `Document` objects.

All objects returned by the `next()` method are of type `WCMApiObject`. Note. This iterator does NOT support the `remove()` operation.

Since:
  6.0

Method Summary
`boolean` | `hasNext()` Returns `true` if the iteration has more elements.
`T` | `next()` Returns the next element in the iteration.
`T` | `nextDocument()` Deprecated. use `next()` instead. Since this class has been generified, the two methods are identical.
`void` | `remove()` This method is not implemented.

Method Detail

### hasNext

    boolean hasNext()

  Returns `true` if the iteration has more elements. (In other words, returns `true` if `next()` would return an element rather than throwing an exception.)

  Specified by:
    `hasNext` in interface `java.util.Iterator<T extends Document>`
  Returns:
    `true` if the iterator has more elements; `false` otherwise

### next

    T next()

  Returns the next element in the iteration. All objects returned from this iterator will be instances of `Document`.

  The common practice is to cast the object returned by `next()` to a `Document`.

  The `hasNext()` method should be called first to ensure there is a next element in the iteration, otherwise an exception may be thrown.

  Specified by:
    `next` in interface `java.util.Iterator<T extends Document>`
  Returns:
    the next element in the iteration.
  Throws:
    `java.util.NoSuchElementException` - if the iteration has no more elements.

### nextDocument

    @Deprecated
    T nextDocument()

  Deprecated. use `next()` instead. Since this class has been generified, the two methods are identical.

  Returns the next `Document` in the iteration.

  The `hasNext()` method should be called first to ensure there is a next element in the iteration, otherwise an exception may be thrown.

  Returns:
    the next `Document` in the iteration.
  Throws:
    `java.util.NoSuchElementException` - if the iteration has no more elements.

### remove

    void remove()

  This method is not implemented. Each call will result in an `UnsupportedOperationException` being thrown.

  Specified by:
    `remove` in interface `java.util.Iterator<T extends Document>`
  Throws:
    `java.lang.UnsupportedOperationException` - each time the method is called

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