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

de.otto.flummi.response.AggregationResult Maven / Gradle / Ivy

The newest version!
package de.otto.flummi.response;

import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;

import java.util.List;
import java.util.Map;

public class AggregationResult {
    private final Map nestedAggregations;
    private final List buckets;

    public AggregationResult(final Map nestedAggregations) {
        this.nestedAggregations = nestedAggregations;
        this.buckets = emptyList();
    }

    public AggregationResult(final List buckets) {
        this.buckets = buckets;
        this.nestedAggregations = emptyMap();
    }

    public List getBuckets() {
        return buckets;
    }

    public Map getNestedAggregations() {
        return nestedAggregations;
    }

    public boolean hasNestedAggregation() {
        return !nestedAggregations.isEmpty();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy