java.lang.Object | |
↳ | com.urbanairship.actions.ActionValue |
An ActionValue is a representation of any value that can be described using JSON. It can contain one of the following: a JsonMap, a JsonList, a Number, a Boolean, String, or it can contain null.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ActionValue(JsonValue jsonValue)
Creates an ActionValue from a JsonValue.
| |||||||||||
ActionValue()
Creates an empty ActionValue.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | describeContents() | ||||||||||
boolean | equals(Object object) | ||||||||||
boolean |
getBoolean(boolean defaultValue)
Gets the contained values as a boolean.
| ||||||||||
double |
getDouble(double defaultValue)
Gets the contained values as an double.
| ||||||||||
int |
getInt(int defaultValue)
Gets the contained values as an int.
| ||||||||||
JsonList |
getList()
Gets the contained values as a JsonList.
| ||||||||||
long |
getLong(long defaultValue)
Gets the contained values as an long.
| ||||||||||
JsonMap |
getMap()
Gets the contained values as a JsonMap.
| ||||||||||
String |
getString(String defaultValue)
Gets the contained values as a String.
| ||||||||||
String |
getString()
Gets the contained value as a String.
| ||||||||||
int | hashCode() | ||||||||||
boolean |
isNull()
If the contained value is null.
| ||||||||||
JsonValue |
toJsonValue()
Returns the objects represented as a JsonValue.
| ||||||||||
String |
toString()
Returns the ActionValue as a JSON encoded String.
| ||||||||||
static ActionValue |
wrap(int value)
Wraps an int as an ActionValue.
| ||||||||||
static ActionValue |
wrap(Object object)
Wraps a
JsonValue compatible object as an ActionValue. | ||||||||||
static ActionValue |
wrap(boolean value)
Wraps a boolean as an ActionValue.
| ||||||||||
static ActionValue |
wrap(String value)
Wraps a String as an ActionValue.
| ||||||||||
static ActionValue |
wrap(char value)
Wraps a char as an ActionValue.
| ||||||||||
static ActionValue |
wrap(JsonSerializable value)
Wraps a JsonSerializable object as an ActionValue.
| ||||||||||
static ActionValue |
wrap(long value)
Wraps a long as an ActionValue.
| ||||||||||
void | writeToParcel(Parcel dest, int flags) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
| |||||||||||
From interface
com.urbanairship.json.JsonSerializable
|
Creates an ActionValue from a JsonValue.
jsonValue | A jsonValue. |
---|
Creates an empty ActionValue.
Gets the contained values as a boolean.
defaultValue | The default value if the contained value is not a boolean. |
---|
Gets the contained values as an double.
defaultValue | The default value if the contained value is not a number. |
---|
Gets the contained values as an int.
defaultValue | The default value if the contained value is not a number. |
---|
Gets the contained values as a JsonList.
Gets the contained values as an long.
defaultValue | The default value if the contained value is not a number. |
---|
Gets the contained values as a JsonMap.
Gets the contained values as a String.
defaultValue | The default value if the contained value is not a String. |
---|
Gets the contained value as a String.
If the contained value is null.
true
if the contained value is null, otherwise false
.
Returns the objects represented as a JsonValue.
Returns the ActionValue as a JSON encoded String.
Wraps an int as an ActionValue.
value | The action's value as an int. |
---|
Wraps a JsonValue
compatible object as an ActionValue.
object | The action's value. |
---|
ActionValueException | If the object is unable to be wrapped into an action value. |
---|
Wraps a boolean as an ActionValue.
value | The action's value as a boolean. |
---|
Wraps a String as an ActionValue.
value | The action's value as a string. |
---|
Wraps a char as an ActionValue.
value | The action's value as a char. |
---|
Wraps a JsonSerializable object as an ActionValue.
value | The action's value as a JsonSerializable object. |
---|
Wraps a long as an ActionValue.
value | The action's value as a long. |
---|