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

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

There is a newer version: 0.2.3
Show newest version
package se.l4.silo.search;

import java.util.List;

import com.google.common.collect.ArrayListMultimap;

public class FacetsImpl
	implements Facets
{
	private final ArrayListMultimap items;

	public FacetsImpl()
	{
		items = ArrayListMultimap.create();
	}

	@Override
	public List get(String id)
	{
		return items.get(id);
	}

	public void add(String facet, String label, int count, Object extra)
	{
		items.put(facet, new DefaultFacetEntry(label, count, extra));
	}

	public void addAll(String facet, List entries)
	{
		items.putAll(facet, entries);
	}

	@Override
	public String toString()
	{
		return getClass().getSimpleName() + items;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy