Package ubic.gemma.core.search
Class SearchResultSet<T extends Identifiable>
- All Implemented Interfaces:
Iterable<SearchResult<T>>,Collection<SearchResult<T>>,Set<SearchResult<T>>
This is a special kind of set designed for holding
SearchResult.
If a better result is added to the set, it replaces the existing one. If the original result had a non-null
SearchResult.getResultObject(), it is transferred over so that it won't need to be filled later on if needed.
The collection also honor the SearchSettings.getMaxResults() value, rejecting any new result unless replacing
an existing one.
- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Constructor Details
-
SearchResultSet
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceCollection<T extends Identifiable>- Specified by:
iteratorin interfaceIterable<T extends Identifiable>- Specified by:
iteratorin interfaceSet<T extends Identifiable>- Specified by:
iteratorin classAbstractCollection<SearchResult<T extends Identifiable>>
-
size
public int size()- Specified by:
sizein interfaceCollection<T extends Identifiable>- Specified by:
sizein interfaceSet<T extends Identifiable>- Specified by:
sizein classAbstractCollection<SearchResult<T extends Identifiable>>
-
add
- Specified by:
addin interfaceCollection<T extends Identifiable>- Specified by:
addin interfaceSet<T extends Identifiable>- Overrides:
addin classAbstractCollection<SearchResult<T extends Identifiable>>
-