public interface GraphObject
Factory class) that provide strongly-typed property
getters and setters to access the underlying data. Since the primary use case for graph objects is sending and
receiving them over the wire to/from Facebook services, they are represented as JSONObjects. No validation is done
that a graph object is actually of a specific type -- any graph object can be treated as any GraphObject-derived
interface, and the presence or absence of specific properties determines its suitability for use as that
particular type of object.
| Modifier and Type | Interface and Description |
|---|---|
static class |
GraphObject.Factory
Creates proxies that implement GraphObject, GraphObjectList, and their derived types.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
asMap()
Returns a Java Collections map of names and properties.
|
<T extends GraphObject> |
cast(Class<T> graphObjectClass)
Returns a new proxy that treats this graph object as a different GraphObject-derived type.
|
org.json.JSONObject |
getInnerJSONObject()
Gets the underlying JSONObject representation of this graph object.
|
Object |
getProperty(String propertyName)
Gets a property of the GraphObject
|
void |
removeProperty(String propertyName)
Removes a property of the GraphObject
|
void |
setProperty(String propertyName,
Object propertyValue)
Sets a property of the GraphObject
|
<T extends GraphObject> T cast(Class<T> graphObjectClass)
graphObjectClass - the type of GraphObject to returnMap<String,Object> asMap()
org.json.JSONObject getInnerJSONObject()
Object getProperty(String propertyName)
propertyName - the name of the property to getvoid setProperty(String propertyName, Object propertyValue)
propertyName - the name of the property to setpropertyValue - the value of the named property to setvoid removeProperty(String propertyName)
propertyName - the name of the property to removeCopyright © 2013. All Rights Reserved.