Class SearchResultSet<T extends Identifiable>

All Implemented Interfaces:
Iterable<SearchResult<T>>, Collection<SearchResult<T>>, Set<SearchResult<T>>

public class SearchResultSet<T extends Identifiable> extends AbstractSet<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