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

org.vertexium.query.HistogramResult Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.query;

public class HistogramResult extends AggregationResult {
    private final Iterable buckets;

    public HistogramResult(Iterable buckets) {
        this.buckets = buckets;
    }

    public Iterable getBuckets() {
        return buckets;
    }

    public HistogramBucket getBucketByKey(Object key) {
        String keyStr = key.toString();
        for (HistogramBucket histogramBucket : getBuckets()) {
            String bucketKey = histogramBucket.getKey().toString();
            if (bucketKey.equals(keyStr)) {
                return histogramBucket;
            }
        }
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy