|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.restfb.Connection<T>
public class Connection<T>
Represents a Graph API Connection type.
Constructor Summary | |
---|---|
Connection(FacebookClient facebookClient,
String json,
Class<T> connectionType)
Creates a connection with the given jsonObject . |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
List<T> |
getData()
Data for this connection. |
String |
getNextPageUrl()
This connection's "next page of data" URL. |
String |
getPreviousPageUrl()
This connection's "previous page of data" URL. |
int |
hashCode()
|
boolean |
hasNext()
Does this connection have a next page of data? |
boolean |
hasPrevious()
Does this connection have a previous page of data? |
Iterator<List<T>> |
iterator()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Connection(FacebookClient facebookClient, String json, Class<T> connectionType)
jsonObject
.
facebookClient
- The FacebookClient
used to fetch additional pages and map
data to JSON objects.json
- Raw JSON which must include a data
field that holds a JSON
array and optionally a paging
field that holds a JSON
object with next/previous page URLs.connectionType
- Connection type token.
FacebookJsonMappingException
- If the provided json
is invalid.Method Detail |
---|
public Iterator<List<T>> iterator()
iterator
in interface Iterable<List<T>>
Iterable.iterator()
public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object object)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public List<T> getData()
public String getPreviousPageUrl()
null
if
there is no previous page.public String getNextPageUrl()
null
if there
is no next page.public boolean hasPrevious()
true
if there is a previous page of data for this
connection, false
otherwise.public boolean hasNext()
true
if there is a next page of data for this connection,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |