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:
java.lang.AutoCloseable,java.lang.Iterable<T>,SearchResults<T>
public class DoipSearchResults<T> extends java.lang.Object implements SearchResults<T>
Used internally byDoipClientto produce search results
-
-
Constructor Summary
Constructors Constructor Description DoipSearchResults(DoipClientResponse resp, java.lang.Class<T> klass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the search results, releasing the connection to the server.java.util.Iterator<T>iterator()Returns anIteratorof the search results (either String or DigitalObject).intsize()Returns the full number of 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 net.dona.doip.client.SearchResults
parallelStream, spliterator, stream
-
-
-
-
Constructor Detail
-
DoipSearchResults
public DoipSearchResults(DoipClientResponse resp, java.lang.Class<T> klass) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
size
public int size()
Description copied from interface:SearchResultsReturns the full number of results across all pages, or -1 if the number is not available- Specified by:
sizein interfaceSearchResults<T>
-
iterator
public java.util.Iterator<T> iterator()
Description copied from interface:SearchResultsReturns anIteratorof the search results (either String or DigitalObject).- Specified by:
iteratorin interfacejava.lang.Iterable<T>- Specified by:
iteratorin interfaceSearchResults<T>
-
close
public void close()
Description copied from interface:SearchResultsCloses the search results, releasing the connection to the server.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceSearchResults<T>
-
-