public class Point extends Message
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_X
The name of the x field for the message.
|
static String |
FIELD_Y
The name of the y field for the message.
|
static String |
FIELD_Z
The name of the z field for the message.
|
static String |
TYPE
The message type.
|
EMPTY_MESSAGEEMPTY_JSON| Constructor and Description |
|---|
Point()
Create a new Point with all 0s.
|
Point(double x,
double y,
double z)
Create a new Point with the given values.
|
| Modifier and Type | Method and Description |
|---|---|
Point |
clone()
Create a clone of this Point.
|
static Point |
fromJsonObject(javax.json.JsonObject jsonObject)
Create a new Point based on the given JSON object.
|
static Point |
fromJsonString(String jsonString)
Create a new Point based on the given JSON string.
|
static Point |
fromMessage(Message m)
Create a new Point based on the given Message.
|
double |
getX()
Get the x value of this point.
|
double |
getY()
Get the y value of this point.
|
double |
getZ()
Get the z value of this point.
|
getMessageType, setMessageTypeequals, hashCode, toJsonObject, toStringpublic static final String FIELD_X
public static final String FIELD_Y
public static final String FIELD_Z
public static final String TYPE
public Point()
public Point(double x,
double y,
double z)
x - The x value of the point.y - The y value of the point.z - The z value of the point.public double getX()
public double getY()
public double getZ()
public static Point fromJsonString(String jsonString)
jsonString - The JSON string to parse.public static Point fromMessage(Message m)
m - The Message to parse.public static Point fromJsonObject(javax.json.JsonObject jsonObject)
jsonObject - The JSON object to parse.Copyright © 2014. All rights reserved.