public static final class GraphObject.Factory extends Object
| Modifier and Type | Method and Description |
|---|---|
static GraphObject |
create()
Creates a GraphObject proxy that initially contains no data.
|
static <T extends GraphObject> |
create(Class<T> graphObjectClass)
Creates a GraphObject-derived proxy that initially contains no data.
|
static GraphObject |
create(org.json.JSONObject json)
Creates a GraphObject proxy that provides typed access to the data in an underlying JSONObject.
|
static <T extends GraphObject> |
create(org.json.JSONObject json,
Class<T> graphObjectClass)
Creates a GraphObject-derived proxy that provides typed access to the data in an underlying JSONObject.
|
static <T> GraphObjectList<T> |
createList(Class<T> graphObjectClass)
Creates a GraphObjectList-derived proxy that initially contains no data.
|
static <T> GraphObjectList<T> |
createList(org.json.JSONArray array,
Class<T> graphObjectClass)
Creates a GraphObjectList-derived proxy that provides typed access to the data in an underlying JSONArray.
|
static boolean |
hasSameId(GraphObject a,
GraphObject b)
Determines if two GraphObjects represent the same underlying graph object, based on their IDs.
|
public static GraphObject create(org.json.JSONObject json)
json - the JSONObject containing the data to be exposedFacebookException - If the passed in Class is not a valid GraphObject interfacepublic static <T extends GraphObject> T create(org.json.JSONObject json, Class<T> graphObjectClass)
json - the JSONObject containing the data to be exposedgraphObjectClass - the GraphObject-derived type to returnFacebookException - If the passed in Class is not a valid GraphObject interfacepublic static GraphObject create()
FacebookException - If the passed in Class is not a valid GraphObject interfacepublic static <T extends GraphObject> T create(Class<T> graphObjectClass)
graphObjectClass - the GraphObject-derived type to returnFacebookException - If the passed in Class is not a valid GraphObject interfacepublic static boolean hasSameId(GraphObject a, GraphObject b)
a - a graph objectb - another graph objectpublic static <T> GraphObjectList<T> createList(org.json.JSONArray array, Class<T> graphObjectClass)
array - the JSONArray containing the data to be exposedgraphObjectClass - the GraphObject-derived type to returnFacebookException - If the passed in Class is not a valid GraphObject interfacepublic static <T> GraphObjectList<T> createList(Class<T> graphObjectClass)
graphObjectClass - the GraphObject-derived type to returnFacebookException - If the passed in Class is not a valid GraphObject interfaceCopyright © 2013. All Rights Reserved.