redis.clients.jedis.search.aggr.Row Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis Show documentation
Show all versions of jedis Show documentation
Jedis is a blazingly small and sane Redis java client.
package redis.clients.jedis.search.aggr;
import java.util.Map;
import redis.clients.jedis.util.DoublePrecision;
public class Row {
private final Map fields;
public Row(Map fields) {
this.fields = fields;
}
public boolean containsKey(String key) {
return fields.containsKey(key);
}
public Object get(String key) {
return fields.get(key);
}
public String getString(String key) {
if (!containsKey(key)) {
return "";
}
return (String) fields.get(key);
}
public long getLong(String key) {
if (!containsKey(key)) {
return 0;
}
return Long.parseLong((String) fields.get(key));
}
public double getDouble(String key) {
if (!containsKey(key)) {
return 0;
}
return DoublePrecision.parseFloatingPointNumber((String) fields.get(key));
}
@Override
public String toString() {
return String.valueOf(fields);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy