/** 解码 */ @Override public void decode(Data data) { this.userId = data.getLong(); this.formationId = data.getInt(); placeIDArray2 = PlaceIDArray2.create(); placeIDArray2.decode(data); this.zhanli = data.getInt(); }
/** 编码 */ @Override public void encode(Data data) { data.writeLong(this.userId); data.writeInt(this.formationId); placeIDArray2.encode(data); data.writeInt(this.zhanli); }
public String toString() { StringBuilder bb = new StringBuilder(); bb.append("userId:").append(this.userId).append(", "); bb.append("formationId:").append(this.formationId).append(", "); bb.append("placeIDArray2:").append(placeIDArray2.toString()).append(", "); bb.append("zhanli:").append(this.zhanli); return bb.toString(); }
@Override public boolean validate() { if (!userIdHandler.validate(userId)) { return false; } if (!formationIdHandler.validate(formationId)) { return false; } if (!placeIDArray2.validate()) { return false; } if (!zhanliHandler.validate(zhanli)) { return false; } return true; }