public class Duration extends Message
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_DATA
The name of the data field for the message.
|
static String |
TYPE
The message type.
|
EMPTY_MESSAGEEMPTY_JSON| Constructor and Description |
|---|
Duration()
Create a new Duration with a default of 0.
|
Duration(Duration data)
Create a new Duration with the given duration primitive.
|
| Modifier and Type | Method and Description |
|---|---|
Duration |
clone()
Create a clone of this Duration.
|
static Duration |
fromJsonObject(javax.json.JsonObject jsonObject)
Create a new Duration based on the given JSON object.
|
static Duration |
fromJsonString(String jsonString)
Create a new Duration based on the given JSON string.
|
static Duration |
fromMessage(Message m)
Create a new Duration based on the given Message.
|
Duration |
getData()
Get the data value of this Duration.
|
getMessageType, setMessageTypeequals, hashCode, toJsonObject, toStringpublic static final String FIELD_DATA
public static final String TYPE
public Duration()
public Duration(Duration data)
data - The data value of this duration.public Duration getData()
public static Duration fromJsonString(String jsonString)
jsonString - The JSON string to parse.public static Duration fromMessage(Message m)
m - The Message to parse.public static Duration fromJsonObject(javax.json.JsonObject jsonObject)
jsonObject - The JSON object to parse.Copyright © 2014. All rights reserved.