MetricGeoHashGrid extends GeoHashGrid { @Override public void setParams(List<String> params) { if (null != params) { if (params.size() >= 1) { metricKey = params.get(METRIC_KEY_INDEX); } if (params.size() >= 2) { valueKey = params.get(VALUE_KEY_INDEX); } } }  @Override void setParams(List<String> params); @Override Number computeCellValue(Map<String,Object> bucket); String getMetricKey(); String getValueKey(); final static String DEFAULT_METRIC_KEY; }
@Test public void testSetParams() { String metricKey = "mymetric"; String valueKey = "myvalue"; List<String> params = new ArrayList<>(); params.add(metricKey); params.add(valueKey); geohashGrid.setParams(params); assertEquals(metricKey, geohashGrid.getMetricKey()); assertEquals(valueKey, geohashGrid.getValueKey()); }