/** * Create a clone of this Goal. */ @Override public GoalMessage clone() { return new GoalMessage(this.header, this.id, this.goal); }
/** * Create a clone of this GoalID. */ @Override public GoalID clone() { return new GoalID(this.stamp, this.id); }
/** * Create a clone of this GoalStatus. */ @Override public GoalStatus clone() { return new GoalStatus(this.goalID, this.status, this.text); }
/** * Create a new Goal based on the given JSON object. Any missing values * will be set to their defaults. * * @param jsonObject * The JSON object to parse. * @return A Goal message based on the given JSON object. */ public static GoalMessage fromJsonObject(JsonObject jsonObject) { Header header = jsonObject.containsKey(GoalMessage.FIELD_HEADER) ? Header.fromJsonObject(jsonObject.getJsonObject(GoalMessage.FIELD_HEADER)) : new Header(); GoalID id = jsonObject.containsKey(GoalMessage.FIELD_ID) ? GoalID.fromJsonObject(jsonObject.getJsonObject(GoalMessage.FIELD_ID)) : new GoalID(); JsonObject goal = jsonObject.containsKey(GoalMessage.FIELD_GOAL) ? jsonObject.getJsonObject(GoalMessage.FIELD_GOAL) : JsonObject.EMPTY_JSON_OBJECT; return new GoalMessage(header, id, goal); } }
/** * Create a clone of this GoalStatusArray. */ @Override public GoalStatusArray clone() { return new GoalStatusArray(this.header, this.statusList); }
/** * Create a new GoalStatus based on the given JSON string. Any missing * values will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A GoalStatus message based on the given JSON string. */ public static GoalStatus fromJsonString(String jsonString) { // convert to a message return GoalStatus.fromMessage(new Message(jsonString)); }
/** * Create a new GoalStatusArray based on the given JSON string. Any missing * values will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A GoalStatusArray message based on the given JSON string. */ public static GoalStatusArray fromJsonString(String jsonString) { // convert to a message return GoalStatusArray.fromMessage(new Message(jsonString)); }
/** * Create a new GoalStatus based on the given Message. Any missing values * will be set to their defaults. * * @param m * The Message to parse. * @return A GoalStatus message based on the given Message. */ public static GoalStatus fromMessage(Message m) { // get it from the JSON object return GoalStatus.fromJsonObject(m.toJsonObject()); }
/** * Create a new GoalID based on the given JSON string. Any missing values * will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A GoalID message based on the given JSON string. */ public static GoalID fromJsonString(String jsonString) { // convert to a message return GoalID.fromMessage(new Message(jsonString)); }
/** * Create a new GoalStatusArray based on the given Message. Any missing * values will be set to their defaults. * * @param m * The Message to parse. * @return A GoalStatusArray message based on the given Message. */ public static GoalStatusArray fromMessage(Message m) { // get it from the JSON object return GoalStatusArray.fromJsonObject(m.toJsonObject()); }
/** * Create a new GoalID based on the given Message. Any missing values will * be set to their defaults. * * @param m * The Message to parse. * @return A GoalID message based on the given Message. */ public static GoalID fromMessage(Message m) { // get it from the JSON object return GoalID.fromJsonObject(m.toJsonObject()); }
/** * Create a new Goal based on the given JSON string. Any missing values * will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A Goal message based on the given JSON string. */ public static GoalMessage fromJsonString(String jsonString) { // convert to a message return GoalMessage.fromMessage(new Message(jsonString)); }
/** * Create a new Goal based on the given Message. Any missing values will * be set to their defaults. * * @param m * The Message to parse. * @return A Goal message based on the given Message. */ public static GoalMessage fromMessage(Message m) { // get it from the JSON object return GoalMessage.fromJsonObject(m.toJsonObject()); }
/** * Create a new empty GoalStatus. */ public GoalStatus() { this(new GoalID(), (byte) 0, ""); }
/** * Create a clone of this GoalStatus. */ @Override public GoalStatus clone() { return new GoalStatus(this.goalID, this.status, this.text); }
/** * Create a clone of this GoalStatusArray. */ @Override public GoalStatusArray clone() { return new GoalStatusArray(this.header, this.statusList); }
/** * Create a new GoalStatus based on the given JSON string. Any missing * values will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A GoalStatus message based on the given JSON string. */ public static GoalStatus fromJsonString(String jsonString) { // convert to a message return GoalStatus.fromMessage(new Message(jsonString)); }
/** * Create a clone of this GoalID. * * @return the goal ID */ @Override public GoalID clone() { return new GoalID(this.stamp, this.id); }
/** * Create a new empty GoalStatus. */ public GoalStatus() { this(new GoalID(), (byte) 0, ""); }
public void cancelAll() { GoalID msg = new GoalID(); cancelTopic.publish(msg); }