ValueMap implements Parcelable { public <T> T get(String key) { return (T)get(key, null); } ValueMap(Map<String, Object> map); protected  ValueMap(Parcel in); static ValueMap empty(); static Builder builder(); static ValueMap map(Object... map); Set<String> keys(); boolean containsKey(String key); T get(String key); T get(String key, T defaultValue); Builder toBuilder(); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); @Override boolean equals(Object other); @Override int hashCode(); static final Creator<ValueMap> CREATOR; }
@Test public void testGet() throws Exception { assertEquals(1, getSequence123().get("1")); assertEquals(null, getSequence123().get("-1")); }
@Test public void testGetOr() throws Exception { assertEquals(1, (int)getSequence123().get("1", 2)); assertEquals(2, (int)getSequence123().get("-1", 2)); }