org.apache.olingo.client.api.domain

## Class ClientEntitySetIterator<T extends ClientEntitySet,E extends ClientEntity>

- java.lang.Object
- - org.apache.olingo.client.api.domain.ClientEntitySetIterator<T,E>

- Type Parameters:
    `E` - concrete ODataEntity implementation
    `T` - concrete ODataEntitySet implementation
  All Implemented Interfaces:
    Iterator<E>

      public class ClientEntitySetIterator<T extends ClientEntitySet,E extends ClientEntity>
      extends Object
      implements Iterator<E>

  OData entity set iterator class.
  Please don't forget to call the `close()>/` method when not needed any more.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ResWrap<Entity>` | `cached`
    `protected ODataClient` | `odataClient`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientEntitySetIterator(ODataClient odataClient, InputStream stream, ContentType contentType)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the current iterator.
    `URI` | `getNext()` Gets the next link if exists.
    `boolean` | `hasNext()`
    `E` | `next()`
    `void` | `remove()` Unsupported operation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Field Detail

    - #### odataClient

          protected final ODataClient odataClient

    - #### cached

          protected ResWrap<Entity> cached

  - ### Constructor Detail

    - #### ClientEntitySetIterator

          public ClientEntitySetIterator(ODataClient odataClient,
                                         InputStream stream,
                                         ContentType contentType)

      Constructor.
      Parameters:
        `odataClient` - client instance getting this request
        `stream` - source stream.
        `contentType` - OData format.

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<E extends ClientEntity>`

    - #### next

          public E next()

      Specified by:
        `next` in interface `Iterator<E extends ClientEntity>`

    - #### remove

          public void remove()

      Unsupported operation.
      Specified by:
        `remove` in interface `Iterator<E extends ClientEntity>`

    - #### close

          public void close()

      Closes the current iterator.

    - #### getNext

          public URI getNext()

      Gets the next link if exists.
      Returns:
        next link if exists; null otherwise.

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.