org.vertexium.query.HistogramResult Maven / Gradle / Ivy
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