se.l4.silo.search.SearchResultImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of silo-search-api Show documentation
Show all versions of silo-search-api Show documentation
API for Lucene-based querying for Silo.
package se.l4.silo.search;
import java.util.Iterator;
import se.l4.silo.FetchResult;
/**
* Implementation of {@link SearchResult}.
*
* @author Andreas Holstenson
*
* @param
*/
public class SearchResultImpl
implements SearchResult
{
private final FetchResult> results;
private final Facets facets;
public SearchResultImpl(FetchResult> results, Facets facets)
{
this.results = results;
this.facets = facets;
}
@Override
public long getSize()
{
return results.getSize();
}
@Override
public long getOffset()
{
return results.getOffset();
}
@Override
public long getLimit()
{
return results.getLimit();
}
@Override
public Iterator> iterator()
{
return results.iterator();
}
@Override
public long getTotal()
{
return results.getTotal();
}
@Override
public boolean isEmpty()
{
return results.isEmpty();
}
@Override
public Facets facets()
{
return facets;
}
@Override
public void close()
{
results.close();
}
}