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

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

The newest version!
package se.l4.silo.search;

import com.google.common.base.MoreObjects;

public class SearchHitImpl
	implements SearchHit
{
	private final T item;
	private final float score;

	public SearchHitImpl(T item, float score)
	{
		this.item = item;
		this.score = score;
	}

	@Override
	public T item()
	{
		return item;
	}

	@Override
	public float score()
	{
		return score;
	}

	@Override
	public String toString()
	{
		return MoreObjects.toStringHelper(this)
			.add("item", item)
			.add("score", score)
			.toString();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy