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

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

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

import java.util.function.Function;

public interface SearchHit
{
	/**
	 * Get the score of this hit.
	 *
	 * @return
	 */
	float score();

	/**
	 * Get the matching data for this hit.
	 *
	 * @return
	 */
	T item();

	default  SearchHit transform(Function func)
	{
		return new SearchHitImpl<>(func.apply(item()), score());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy