se.l4.silo.search.SearchHitImpl 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.
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();
}
}