Package net.dona.doip.client
Interface SearchResults<T>
-
- Type Parameters:
T
- either String for searchIds or DigitalObject for full search
- All Superinterfaces:
java.lang.AutoCloseable
,java.lang.Iterable<T>
- All Known Implementing Classes:
DoipSearchResults
public interface SearchResults<T> extends java.lang.Iterable<T>, java.lang.AutoCloseable
A representation of search results fromDoipClient
search operations. Provides either ids (an {code Iterable} orStream
of String objects) or Digital Objects (anIterable
orStream
of DigitalObject objects).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
close()
Closes the search results, releasing the connection to the server.java.util.Iterator<T>
iterator()
Returns anIterator
of the search results (either String or DigitalObject).default java.util.stream.Stream<T>
parallelStream()
Returns a potentially parallelStream
of the search results (either String or DigitalObject).int
size()
Returns the full number of results across all pages, or -1 if the number is not availabledefault java.util.Spliterator<T>
spliterator()
default java.util.stream.Stream<T>
stream()
Returns anStream
of the search results (either String or DigitalObject).
-
-
-
Method Detail
-
size
int size()
Returns the full number of results across all pages, or -1 if the number is not available
-
iterator
java.util.Iterator<T> iterator()
Returns anIterator
of the search results (either String or DigitalObject).- Specified by:
iterator
in interfacejava.lang.Iterable<T>
-
close
void close()
Closes the search results, releasing the connection to the server.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
spliterator
default java.util.Spliterator<T> spliterator()
- Specified by:
spliterator
in interfacejava.lang.Iterable<T>
-
stream
default java.util.stream.Stream<T> stream()
Returns anStream
of the search results (either String or DigitalObject).
-
parallelStream
default java.util.stream.Stream<T> parallelStream()
Returns a potentially parallelStream
of the search results (either String or DigitalObject).
-
-