com.facebook.model
Interface GraphObjectList<T>

Type Parameters:
T - the type of elements in the list
All Superinterfaces:
Collection<T>, Iterable<T>, List<T>

public interface GraphObjectList<T>
extends List<T>

GraphObjectList is the primary representation of a collection of graph objects in the Facebook SDK for Android. It is not implemented by any concrete classes, but rather by a proxy (see the Factory class). A GraphObjectList can actually contain elements of any type, not just graph objects, but its principal use in the SDK is to contain types derived from GraphObject.


Method Summary
<U extends GraphObject>
GraphObjectList<U>
castToListOf(Class<U> graphObjectClass)
          If T is derived from GraphObject, returns a new GraphObjectList exposing the same underlying data as a new GraphObject-derived type.
 JSONArray getInnerJSONArray()
          Gets the underlying JSONArray representation of the data.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

castToListOf

<U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass)
If T is derived from GraphObject, returns a new GraphObjectList exposing the same underlying data as a new GraphObject-derived type.

Parameters:
graphObjectClass - the GraphObject-derived type to return a list of
Returns:
a list representing the same underlying data, exposed as the new GraphObject-derived type
Throws:
FacebookGraphObjectException - if T does not derive from GraphObject

getInnerJSONArray

JSONArray getInnerJSONArray()
Gets the underlying JSONArray representation of the data.

Returns:
the underlying JSONArray representation of the data