package com.cardshifter.api.outgoing;

import com.cardshifter.api.messages.Message;

public class UpdateMessage extends Message {

	private int id;
	private Object key;
	private Object value;

    public UpdateMessage() {
		this(0, "", 0);
	}

	public UpdateMessage(int id, Object key, Object value) {
		super("update");
		this.id = id;
		this.key = key;
		this.value = value;
	}

	public int getId() {
		return id;
	}
	
	public Object getKey() {
		return key;
	}
	
	public Object getValue() {
		return value;
	}

	@Override
	public String toString() {
		return "UpdateMessage [id=" + id + ", key=" + key + ", value=" + value + "]";
	}
	
}

@@ -78,16 +78,67 @@
 ssage;%0A%0A
+/** Message stating an entity has been updated. */%0A
 public c
@@ -240,13 +240,46 @@
 ue;%0A
+%09/** Constructor. (no params) */
 %0A    
+%09
 publ
@@ -316,24 +316,193 @@
  %22%22, 0);%0A%09%7D%0A
+%09/**%0A%09 * Constructor.%0A%09 * @param id  The Id of this entity%0A%09 * @param key  The key of this updated object%0A%09 * @param value  The value that this object is updated to%0A%09 */
 %0A%09public Upd
@@ -626,16 +626,54 @@
 lue;%0A%09%7D%0A
+%09/** @return  The Id of this entity */
 %0A%09public
@@ -708,101 +708,255 @@
 %09%7D%0A%09
-%0A%09public Object getKey() %7B%0A%09%09return key;%0A%09%7D%0A%09%0A%09public Object getValue() %7B%0A%09%09return value;%0A%09%7D%0A
+/** @return  The key of this updated object */%0A%09public Object getKey() %7B%0A%09%09return key;%0A%09%7D%0A%09/** @return  The value that this object is updated to */%0A%09public Object getValue() %7B%0A%09%09return value;%0A%09%7D%0A%09/** @return  This message as converted to String */
 %0A%09@O

Update UpdateMessage.java