@Test public void getTags() { initMap(); Assert.assertEquals(tags, CacheUtil.getTags(cacheKey)); }
public static Map<String, String> getTags(String key) { String[] keyVals = key.split(","); Map<String, String> tags = new HashMap<>(); Arrays.asList(keyVals).forEach(keyVal -> { String[] kv = keyVal.split(CACHE_KEY_DELIMITER); byte[] decodedValue = Base64.getDecoder().decode(kv[1]); String value = new String(decodedValue); tags.put(kv[0], value); }); return tags; }
CacheUtil { public static Map<String, String> getTags(String key) { String[] keyVals = key.split(","); Map<String, String> tags = new HashMap<>(); Arrays.asList(keyVals).forEach(keyVal -> { String[] kv = keyVal.split(CACHE_KEY_DELIMITER); byte[] decodedValue = Base64.getDecoder().decode(kv[1]); String value = new String(decodedValue); tags.put(kv[0], value); }); return tags; } }
CacheUtil { public static Map<String, String> getTags(String key) { String[] keyVals = key.split(","); Map<String, String> tags = new HashMap<>(); Arrays.asList(keyVals).forEach(keyVal -> { String[] kv = keyVal.split(CACHE_KEY_DELIMITER); byte[] decodedValue = Base64.getDecoder().decode(kv[1]); String value = new String(decodedValue); tags.put(kv[0], value); }); return tags; }  }
CacheUtil { public static Map<String, String> getTags(String key) { String[] keyVals = key.split(","); Map<String, String> tags = new HashMap<>(); Arrays.asList(keyVals).forEach(keyVal -> { String[] kv = keyVal.split(CACHE_KEY_DELIMITER); byte[] decodedValue = Base64.getDecoder().decode(kv[1]); String value = new String(decodedValue); tags.put(kv[0], value); }); return tags; }  static String getKey(Map<String, String> tags); static Map<String, String> getTags(String key); static String getDetectors(List<Detector> detectors); static List<Detector> buildDetectors(String detectorsString); }
CacheUtil { public static Map<String, String> getTags(String key) { String[] keyVals = key.split(","); Map<String, String> tags = new HashMap<>(); Arrays.asList(keyVals).forEach(keyVal -> { String[] kv = keyVal.split(CACHE_KEY_DELIMITER); byte[] decodedValue = Base64.getDecoder().decode(kv[1]); String value = new String(decodedValue); tags.put(kv[0], value); }); return tags; }  static String getKey(Map<String, String> tags); static Map<String, String> getTags(String key); static String getDetectors(List<Detector> detectors); static List<Detector> buildDetectors(String detectorsString);  }