public final class Parameter extends Object
Modifier and Type | Field and Description |
---|---|
String |
name
Parameter name.
|
String |
value
Parameter value.
|
Modifier and Type | Method and Description |
---|---|
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. |
public final String name
public final String value
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 Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.