|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.restfb.Parameter
public final class Parameter
Representation of a Facebook API request parameter.
| Field Summary | |
|---|---|
String |
name
Parameter name. |
String |
value
Parameter value. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
String |
toString()
|
static Parameter |
with(String name,
Object value)
Factory method which provides an instance with the given name and
value. |
static Parameter |
with(String name,
Object value,
JsonMapper jsonMapper)
Factory method which provides an instance with the given name and
value, using the provided jsonMapper to turn value
into a JSON string. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final String name
public final String value
| Method Detail |
|---|
public static Parameter with(String name,
Object value)
name and
value.
The value parameter is often a String or primitive type
like Integer, but you may pass in a List,
Map, or your own @Facebook-annotated Javabean
and it will be converted to JSON automatically. See the "attachment"
section of the
stream.publish API documentation for an example of where this is
useful.
name - The parameter name.value - The parameter value.
Parameter instance with the given name and
value.
IllegalArgumentException - If name or value is null or a blank
string.
FacebookJsonMappingException - If an error occurs when converting value to JSON.
public static Parameter with(String name,
Object value,
JsonMapper jsonMapper)
name and
value, using the provided jsonMapper to turn value
into a JSON string.
The value parameter is often a String or primitive type
like Integer, but you may pass in a List,
Map, or your own @Facebook-annotated Javabean
and it will be converted to JSON automatically. See the "attachment"
section of the
stream.publish API documentation for an example of where this is
useful.
name - The parameter name.value - The parameter value.
Parameter instance with the given name and
value.
IllegalArgumentException - If name or value is null or a blank
string.
FacebookJsonMappingException - If an error occurs when converting value to JSON.public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||