@Test public void testGetType() { assertEquals(Boolean.class, map.getType("true")); assertEquals(Long.class, map.getType("one")); assertEquals(String.class, map.getType("string")); assertNull(map.getType("bad")); }
public Class<?> getType(String name) { final Object value = values.get(name); return value != null ? value.getClass() : null; }
AttributesMap implements Map<String, Object> { public Class<?> getType(String name) { final Object value = values.get(name); return value != null ? value.getClass() : null; } }
AttributesMap implements Map<String, Object> { public Class<?> getType(String name) { final Object value = values.get(name); return value != null ? value.getClass() : null; } private  AttributesMap(ImmutableMap<String, Object> values); }
AttributesMap implements Map<String, Object> { public Class<?> getType(String name) { final Object value = values.get(name); return value != null ? value.getClass() : null; } private  AttributesMap(ImmutableMap<String, Object> values); static Builder newBuilder(); static AttributesMap empty(); String getString(String name); String getString(String name, String defaultValue); Long getNumber(String name); Long getNumber(String name, long defaultValue); Boolean getBoolean(String name); Boolean getBoolean(String name, boolean defaultValue); Class<?> getType(String name); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object o); @Override boolean containsValue(Object o); @Override Object get(Object o); @Override Object put(String s, Object o); @Override Object remove(Object o); @Override void putAll(Map<? extends String, ?> map); @Override void clear(); @Override Set<String> keySet(); @Override Collection<Object> values(); @Override Set<Entry<String, Object>> entrySet(); AttributesMap filter(Set<String> keys); }
AttributesMap implements Map<String, Object> { public Class<?> getType(String name) { final Object value = values.get(name); return value != null ? value.getClass() : null; } private  AttributesMap(ImmutableMap<String, Object> values); static Builder newBuilder(); static AttributesMap empty(); String getString(String name); String getString(String name, String defaultValue); Long getNumber(String name); Long getNumber(String name, long defaultValue); Boolean getBoolean(String name); Boolean getBoolean(String name, boolean defaultValue); Class<?> getType(String name); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object o); @Override boolean containsValue(Object o); @Override Object get(Object o); @Override Object put(String s, Object o); @Override Object remove(Object o); @Override void putAll(Map<? extends String, ?> map); @Override void clear(); @Override Set<String> keySet(); @Override Collection<Object> values(); @Override Set<Entry<String, Object>> entrySet(); AttributesMap filter(Set<String> keys);  }