Interface RetrievalResultList
-
- All Superinterfaces:
Iterable<RetrievalResult>
- All Known Subinterfaces:
DependencyRetrievalResultList
- All Known Implementing Classes:
DependencyRetrievalResultListImpl,RetrievalResultListImpl
public interface RetrievalResultList extends Iterable<RetrievalResult>
A list of retrieval results.- Author:
- Rainer Maximini
- See Also:
RetrievalResult
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(RetrievalResult object)Adds a retrieval result to the list.RetrievalResultListImplfromXML(String retrievalResultListXML)Converts a serialized RetrievalResultList-XML into a Query-objectlonggetRetrievalTime()longgetRetrievalTime(String format)StringgetRetrievalTimeString()StringgetRetrievalTimeString(String format)Iterator<RetrievalResult>iterator()voidremove(RetrievalResult object)Removes a retrieval result from the list.voidsetRetrievalTime(long retrievalTimeNano)Set the retrieval time.intsize()Stream<RetrievalResult>stream()Returns a stream of the retrieval results.ReadableObjectPool<DataObject>toObjectPool()Transforms this retrieval result list into aWriteableObjectPool.StringtoXML()Converts full RetrievalResultList to XMLStringtoXML(HashMap<Class,List<String>> toOmit)Converts RetrievalResultList to XML, ignoring the fields specified in toOmit-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
size
int size()
- Returns:
- The number of retrieval results.
-
iterator
Iterator<RetrievalResult> iterator()
- Specified by:
iteratorin interfaceIterable<RetrievalResult>- Returns:
- an ordered iterator over all retrieval results starting with the most similar one
-
toObjectPool
ReadableObjectPool<DataObject> toObjectPool()
Transforms this retrieval result list into aWriteableObjectPool.- Returns:
- the transformed pool
-
getRetrievalTime
long getRetrievalTime()
- Returns:
- The time used for retrieval in nanoseconds.
-
setRetrievalTime
void setRetrievalTime(long retrievalTimeNano)
Set the retrieval time.- Parameters:
retrievalTimeNano- the retrieval time in nanoseconds
-
getRetrievalTime
long getRetrievalTime(String format)
- Parameters:
format- The format for the time (nanoseconds, microseconds, milliseconds, seconds)- Returns:
- The time used for retrieval in the specified format.
-
getRetrievalTimeString
String getRetrievalTimeString()
- Returns:
- The time used for retrieval as formatted String
-
getRetrievalTimeString
String getRetrievalTimeString(String format)
- Parameters:
format- The format for the time (nanoseconds, microseconds, milliseconds, seconds)- Returns:
- The time used for retrieval as String in the specified format.
-
add
void add(RetrievalResult object)
Adds a retrieval result to the list.- Parameters:
object- The retrieval result to add.
-
remove
void remove(RetrievalResult object)
Removes a retrieval result from the list.- Parameters:
object- The retrieval result to remove.
-
stream
Stream<RetrievalResult> stream()
Returns a stream of the retrieval results.- Returns:
- a stream of results
-
toXML
String toXML()
Converts full RetrievalResultList to XML- Returns:
- XML String
-
toXML
String toXML(HashMap<Class,List<String>> toOmit)
Converts RetrievalResultList to XML, ignoring the fields specified in toOmit- Parameters:
toOmit- HashMap that contains classes as a key and a corresponding list of fields that should be ignored in the particular class- Returns:
- XML String
-
fromXML
RetrievalResultListImpl fromXML(String retrievalResultListXML)
Converts a serialized RetrievalResultList-XML into a Query-object- Parameters:
retrievalResultListXML- Query XML String- Returns:
- Query-object
-
-