All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.l4.silo.search.SearchResultImpl Maven / Gradle / Ivy

There is a newer version: 0.2.3
Show newest version
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();
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy