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

com.scaleset.search.AggregationResults Maven / Gradle / Ivy

There is a newer version: 0.24.0
Show newest version
package com.scaleset.search;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

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

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({"stats", "buckets"})
public class AggregationResults {

    private List buckets = new ArrayList();
    private Stats stats;
    @JsonIgnore
    private String name;

    public AggregationResults() {
    }

    public AggregationResults(String name, List buckets) {
        this(name, buckets, null);
    }

    public AggregationResults(String name, Stats stats) {
        this(name, null, stats);
    }

    public AggregationResults(String name, List buckets, Stats stats) {
        this.name = name;
        if (buckets != null) {
            this.buckets.addAll(buckets);
        }
        this.stats = stats;
    }

    public List getBuckets() {
        return buckets;
    }

    public String getName() {
        return name;
    }

    public Stats getStats() {
        return stats;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy