ParseObject implements Parcelable { @Nullable public <V> Map<String, V> getMap(String key) { synchronized (mutex) { Object value = estimatedData.get(key); if (!(value instanceof Map)) { return null; } @SuppressWarnings("unchecked") Map<String, V> returnValue = (Map<String, V>) value; return returnValue; } } protected  ParseObject();  ParseObject(String theClassName); static ParseObject create(String className); @SuppressWarnings("unchecked") static T create(Class<T> subclass); static ParseObject createWithoutData(String className, String objectId); @SuppressWarnings({"unused", "unchecked"}) static T createWithoutData(Class<T> subclass, String objectId); static void registerSubclass(Class<? extends ParseObject> subclass); static T fromJSON(JSONObject json, String defaultClassName,
                                                     ParseDecoder decoder,
                                                     Set<String> selectedKeys); static T fromJSON(JSONObject json, String defaultClassName,
                                                     ParseDecoder decoder); static void deleteAll(List<T> objects); static void deleteAllInBackground(List<T> objects, DeleteCallback callback); static Task<Void> deleteAllInBackground(final List<T> objects); static void saveAll(List<T> objects); static void saveAllInBackground(List<T> objects, SaveCallback callback); static Task<Void> saveAllInBackground(final List<T> objects); static Task<List<T>> fetchAllIfNeededInBackground(
            final List<T> objects); static List<T> fetchAllIfNeeded(List<T> objects); static void fetchAllIfNeededInBackground(final List<T> objects,
                                                                            FindCallback<T> callback); static Task<List<T>> fetchAllInBackground(final List<T> objects); static List<T> fetchAll(List<T> objects); static void fetchAllInBackground(List<T> objects,
                                                                    FindCallback<T> callback); static void pinAllInBackground(String name,
                                                                  List<T> objects, SaveCallback callback); static Task<Void> pinAllInBackground(final String name,
                                                                        final List<T> objects); static void pinAll(String name,
                                                      List<T> objects); static void pinAllInBackground(List<T> objects,
                                                                  SaveCallback callback); static Task<Void> pinAllInBackground(List<T> objects); static void pinAll(List<T> objects); static void unpinAllInBackground(String name, List<T> objects,
                                                                    DeleteCallback callback); static Task<Void> unpinAllInBackground(String name,
                                                                          List<T> objects); static void unpinAll(String name,
                                                        List<T> objects); static void unpinAllInBackground(List<T> objects,
                                                                    DeleteCallback callback); static Task<Void> unpinAllInBackground(List<T> objects); static void unpinAll(List<T> objects); static void unpinAllInBackground(String name, DeleteCallback callback); static Task<Void> unpinAllInBackground(String name); static void unpinAll(String name); static void unpinAllInBackground(DeleteCallback callback); static Task<Void> unpinAllInBackground(); static void unpinAll(); String getClassName(); Date getUpdatedAt(); Date getCreatedAt(); Set<String> keySet(); void revert(String key); void revert(); boolean isDirty(); boolean isDirty(String key); String getObjectId(); void setObjectId(String newObjectId); final void save(); final Task<Void> saveInBackground(); final void saveInBackground(SaveCallback callback); final void saveEventually(SaveCallback callback); final Task<Void> saveEventually(); final void deleteEventually(DeleteCallback callback); final Task<Void> deleteEventually(); T fetch(); final Task<T> fetchInBackground(); final void fetchInBackground(GetCallback<T> callback); final Task<T> fetchIfNeededInBackground(); T fetchIfNeeded(); final void fetchIfNeededInBackground(GetCallback<T> callback); final Task<Void> deleteInBackground(); final void delete(); final void deleteInBackground(DeleteCallback callback); void put(@NonNull String key, @NonNull Object value); boolean has(@NonNull String key); void increment(@NonNull String key); void increment(@NonNull String key, @NonNull Number amount); void add(@NonNull String key, Object value); void addAll(@NonNull String key, Collection<?> values); void addUnique(@NonNull String key, Object value); void addAllUnique(@NonNull String key, Collection<?> values); void remove(@NonNull String key); void removeAll(@NonNull String key, Collection<?> values); boolean containsKey(@NonNull String key); @Nullable String getString(@NonNull String key); @Nullable byte[] getBytes(String key); @Nullable Number getNumber(String key); @Nullable JSONArray getJSONArray(String key); @Nullable List<T> getList(String key); @Nullable Map<String, V> getMap(String key); @Nullable JSONObject getJSONObject(String key); int getInt(@NonNull String key); double getDouble(@NonNull String key); long getLong(@NonNull String key); boolean getBoolean(@NonNull String key); @Nullable Date getDate(@NonNull String key); @Nullable ParseObject getParseObject(@NonNull String key); @Nullable ParseUser getParseUser(@NonNull String key); @Nullable ParseFile getParseFile(@NonNull String key); @Nullable ParseGeoPoint getParseGeoPoint(@NonNull String key); @Nullable ParsePolygon getParsePolygon(@NonNull String key); @Nullable ParseACL getACL(); void setACL(ParseACL acl); boolean isDataAvailable(); boolean isDataAvailable(@NonNull String key); @NonNull ParseRelation<T> getRelation(@NonNull String key); @Nullable Object get(@NonNull String key); boolean hasSameId(ParseObject other); void fetchFromLocalDatastoreInBackground(GetCallback<T> callback); void fetchFromLocalDatastore(); void pinInBackground(String name, SaveCallback callback); Task<Void> pinInBackground(String name); void pin(String name); void pinInBackground(SaveCallback callback); Task<Void> pinInBackground(); void pin(); void unpinInBackground(String name, DeleteCallback callback); Task<Void> unpinInBackground(String name); void unpin(String name); void unpinInBackground(DeleteCallback callback); Task<Void> unpinInBackground(); void unpin(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); static final String DEFAULT_PIN; static final String KEY_OBJECT_ID; static final String KEY_CREATED_AT; static final String KEY_UPDATED_AT; final static Creator<ParseObject> CREATOR; }
@Test public void testGetMap() throws Exception { ParseObject object = new ParseObject("Test"); JSONObject json = new JSONObject(); json.put("key", "value"); json.put("keyAgain", "valueAgain"); object.put("key", json); Map map = object.getMap("key"); assertEquals(2, map.size()); assertEquals("value", map.get("key")); assertEquals("valueAgain", map.get("keyAgain")); }