@Test public void testGetString() { Map<String, Object> attrs = new HashMap<String, Object>(); attrs.put("string", "string"); attrs.put("integer", 1000000009); Namespace ns = new Namespace(attrs); assertEquals("string", ns.getString("string")); assertEquals("1000000009", ns.getString("integer")); }
public String getString(String dest) { Object o = get(dest); if(o == null) { return null; } return o.toString(); }
Namespace { public String getString(String dest) { Object o = get(dest); if(o == null) { return null; } return o.toString(); } }
Namespace { public String getString(String dest) { Object o = get(dest); if(o == null) { return null; } return o.toString(); } Namespace(Map<String, Object> attrs); }
Namespace { public String getString(String dest) { Object o = get(dest); if(o == null) { return null; } return o.toString(); } Namespace(Map<String, Object> attrs); @SuppressWarnings("unchecked") T get(String dest); String getString(String dest); Byte getByte(String dest); Short getShort(String dest); Integer getInt(String dest); Long getLong(String dest); Float getFloat(String dest); Double getDouble(String dest); Boolean getBoolean(String dest); List<E> getList(String dest); Map<String, Object> getAttrs(); @Override String toString(); }
Namespace { public String getString(String dest) { Object o = get(dest); if(o == null) { return null; } return o.toString(); } Namespace(Map<String, Object> attrs); @SuppressWarnings("unchecked") T get(String dest); String getString(String dest); Byte getByte(String dest); Short getShort(String dest); Integer getInt(String dest); Long getLong(String dest); Float getFloat(String dest); Double getDouble(String dest); Boolean getBoolean(String dest); List<E> getList(String dest); Map<String, Object> getAttrs(); @Override String toString();  }