
io.redisearch.aggregation.Row Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jredisearch Show documentation
Show all versions of jredisearch Show documentation
Official client for Redis Search
The newest version!
package io.redisearch.aggregation;
import java.util.Map;
/**
* Created by mnunberg on 5/17/18.
*
* Row in aggregation result-set
*/
public class Row {
private final Map fields;
public Row(Map fields) {
this.fields = fields;
}
public boolean containsKey(String key) {
return fields.containsKey(key);
}
public String getString(String key) {
if (!containsKey(key)) {
return "";
}
return new String((byte[])fields.get(key));
}
public long getLong(String key) {
if (!containsKey(key)) {
return 0;
}
return Long.parseLong(getString(key));
}
public double getDouble(String key) {
if (!containsKey(key)) {
return 0;
}
return Double.parseDouble(getString(key));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy