Package net.dona.doip.client

# Class DoipSearchResults<T>

java.lang.Object
net.dona.doip.client.DoipSearchResults<T>

Type Parameters:
  `T` - either String for searchIds or DigitalObject for full search

All Implemented Interfaces:
  `AutoCloseable`, `Iterable<T>`, `SearchResults<T>`

public class DoipSearchResults<T> extends Object implements SearchResults<T>
Used internally by `DoipClient` to produce search results

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DoipSearchResults(DoipClientResponse resp, Class<T> klass)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes the search results, releasing the connection to the server.
  `com.google.gson.JsonArray`
  `getFacets()`
  `Iterator<T>`
  `iterator()`
  Returns an `Iterator` of the search results (either String or DigitalObject).
  `int`
  `size()`
  Returns the full number of search results across all pages, or -1 if the number is not available

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

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

  ### Methods inherited from interface java.lang.Iterable

  `forEach`

  ### Methods inherited from interface net.dona.doip.client.SearchResults

  `parallelStream, spliterator, stream`

- ## Constructor Details

  - ### DoipSearchResults

    public DoipSearchResults(DoipClientResponse resp, Class<T> klass) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### size

    public int size()
    Description copied from interface: `SearchResults`
    Returns the full number of search results across all pages, or -1 if the number is not available
    Specified by:
      `size` in interface `SearchResults<T>`
    Returns:
      the full number of search result across all pages, or -1 if the number is not available

  - ### getFacets

    public com.google.gson.JsonArray getFacets()
    Specified by:
      `getFacets` in interface `SearchResults<T>`

  - ### iterator

    public Iterator<T> iterator()
    Description copied from interface: `SearchResults`
    Returns an `Iterator` of the search results (either String or DigitalObject).
    Specified by:
      `iterator` in interface `Iterable<T>`
    Specified by:
      `iterator` in interface `SearchResults<T>`

  - ### close

    public void close()
    Description copied from interface: `SearchResults`
    Closes the search results, releasing the connection to the server.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `SearchResults<T>`