Mercurial > hg > Members > tatsuki > Alice
view src/main/java/alice/test/topology/aquarium/fx/FishInfo.java @ 393:38021fceabef draft multicast
test commit
author | tatsuki |
---|---|
date | Tue, 17 Jun 2014 17:39:47 +0900 |
parents | e29cf08ad1f3 |
children |
line wrap: on
line source
package alice.test.topology.aquarium.fx; import org.msgpack.annotation.Message; @Message public class FishInfo { // public fields are serialized. public double x = 0; public double y = 0; public double z = 0; public String name; public int size = 1; public String type = "defalut"; // use select object type. after implement may be... public FishInfo(){ // this constructor is nothing to do, but need for serializing with MessagePack } public FishInfo(double x,double y,double z){ this.x = x; this.y = y; this.z = z; } public void setName(String name){ this.name = name; } public void setSize(int size){ this.size = size; } public double getX(){ return this.x; } public void setX(double x){ this.x = x; } public double getY(){ return this.y; } public void setY(double y){ this.y = y; } public double getZ(){ return this.z; } public void setZ(double z){ this.z = z; } public FishInfo clone(){ FishInfo info = new FishInfo(this.x,this.y,this.z); info.setName(this.name); return info; } }