Package com.restfb
Klasse Connection<T>
java.lang.Object
com.restfb.Connection<T>
- Typparameter:
T
- The Facebook type
Represents a Graph API Connection type.
- Autor:
- Mark Allen
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungprotected static class
Iterator over connection pages. -
Konstruktorübersicht
KonstruktorBeschreibungConnection
(FacebookClient facebookClient, String json, Class<T> connectionType) Creates a connection with the givenjsonObject
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
protected Connection<T>
Fetches the next page of the connection.getData()
Data for this connection.This connection's "next page of data" URL.getOrder()
returns the order of the elementsThis connection's "previous page of data" URL.provides the total count of elements, if FB provides them (API ≥ v2.0)int
hashCode()
boolean
hasNext()
Does this connection have a next page of data?boolean
Does this connection have a previous page of data?iterator()
toString()
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
-
Konstruktordetails
-
Connection
Creates a connection with the givenjsonObject
.- Parameter:
facebookClient
- TheFacebookClient
used to fetch additional pages and map data to JSON objects.json
- Raw JSON which must include adata
field that holds a JSON array and optionally apaging
field that holds a JSON object with next/previous page URLs.connectionType
- Connection type token.- Löst aus:
FacebookJsonMappingException
- If the providedjson
is invalid.- Seit:
- 1.6.7
-
-
Methodendetails
-
iterator
-
fetchNextPage
Fetches the next page of the connection. Designed to be used byConnection.Itr
.- Gibt zurück:
- The next page of the connection.
- Seit:
- 1.6.7
-
toString
-
equals
-
hashCode
-
getData
Data for this connection.- Gibt zurück:
- Data for this connection.
-
getPreviousPageUrl
This connection's "previous page of data" URL.- Gibt zurück:
- This connection's "previous page of data" URL, or
null
if there is no previous page. - Seit:
- 1.5.3
-
getNextPageUrl
This connection's "next page of data" URL.- Gibt zurück:
- This connection's "next page of data" URL, or
null
if there is no next page. - Seit:
- 1.5.3
-
hasPrevious
Does this connection have a previous page of data?- Gibt zurück:
true
if there is a previous page of data for this connection,false
otherwise.
-
hasNext
Does this connection have a next page of data?- Gibt zurück:
true
if there is a next page of data for this connection,false
otherwise.
-
getTotalCount
provides the total count of elements, if FB provides them (API ≥ v2.0)- Gibt zurück:
- the total count of elements if present
- Seit:
- 1.6.16
-
getOrder
returns the order of the elements- Gibt zurück:
- the order of the elements
-
getBeforeCursor
-
getAfterCursor
-