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

com.rbmhtechnology.vind.api.result.facet.TermFacetResult Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package com.rbmhtechnology.vind.api.result.facet;

import java.util.ArrayList;
import java.util.List;

/**
 * Class to store the term facet response.
 * @author Thomas Kurz ([email protected])
 * @since 27.06.16.
 */
public class TermFacetResult implements FacetResult {

    private List> values;

    /**
     * Creates a new instance of {@link TermFacetResult}.
     */
    public TermFacetResult() {
        this.values = new ArrayList<>();
    }

    /**
     * Creates a new instance of {@link TermFacetResult}.
     * @param values List of {@link FacetValue} containing the term facet results.
     */
    public TermFacetResult(List> values) {
        this.values = values;
    }

    /**
     * Gets the list of {@link FacetValue}.
     * @return List of {@link FacetValue}.
     */
    public List> getValues() {
        return values;
    }

    public TermFacetResult addFacetValue(FacetValue value) {
        values.add(value);
        return this;
    }

    @Override
    public String toString() {
        return "TermFacetResult" + values.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy