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

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

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

import java.util.List;

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

    private List> values;
    private T start;
    private T end;
    private Long gap;

    /**
     * Creates a new instance of{@link RangeFacetResult}.
     * @param values List of {@link FacetValue} with one element for each step on the range with matching values.
     * @param start Lower limit of the specified range.
     * @param end Higher limit of the specified range.
     * @param gap Size between the range steps.
     */
    public RangeFacetResult(List> values, T start, T end, Long gap) {
        this.values = values;
        this.start = start;
        this.end = end;
        this.gap = gap;
    }

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

    /**
     * Gets the starting point of the range.
     * @return T typed lower limit of the range.
     */
    public T getStart() {
        return start;
    }
    /**
     * Gets the ending point of the range.
     * @return T typed higher limit of the range.
     */
    public T getEnd() {
        return end;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy