com.rbmhtechnology.vind.api.result.facet.FacetValue Maven / Gradle / Ivy
package com.rbmhtechnology.vind.api.result.facet;
/**
* Generic facet value.
* @author Thomas Kurz ([email protected])
* @since 27.06.16.
*/
public class FacetValue {
private T value;
private long count;
/**
* Creates a new instance of {@link FacetValue}.
* @param value Faceted value of type T.
* @param count Count of documents grouped in this facet.
*/
public FacetValue(T value, long count) {
this.value = value;
this.count = count;
}
/**
* Gets the faceted value.
* @return T value of the facet.
*/
public T getValue() {
return value;
}
/**
* Gets the number of documents grouped in this facet value.
* @return long number of documents.
*/
public long getCount() {
return count;
}
@Override
public String toString() {
return "FacetValue{" +
"value=" + value +
", count=" + count +
'}';
}
}