|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.ac.nagoyau.is.ss.kishii.suntori.message.RCRSCSMessage
public abstract class RCRSCSMessage
This class represent the transmitted message.
Field Summary | |
---|---|
protected static DataType[] |
COMMON_DATA_TYPE
|
protected java.util.List<RCRSCSData<?>> |
data
|
protected BaseMessageType |
messageType
|
Constructor Summary | |
---|---|
RCRSCSMessage(BaseMessageType type,
int time)
Constructor |
|
RCRSCSMessage(BaseMessageType type,
java.util.List<java.lang.Integer> bitList,
int offset,
java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
The method that the library use to convert the message. |
|
RCRSCSMessage(java.util.List<RCRSCSData<?>> data,
BaseMessageType type)
Constructor |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
protected int |
getBrokenness(int index)
|
protected int |
getBuriedness(int index)
|
protected rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> |
getCoodinate(int index)
|
protected int |
getDamage(int index)
|
java.util.List<RCRSCSData<?>> |
getData()
Return list of data registered on the message. |
protected RCRSCSData<?> |
getData(DataType dType,
int index)
Return data that have specified DataType and index. This method is only used in the class extending this class. |
protected DataType[] |
getDataTypeArray()
|
protected java.util.List<rescuecore2.worldmodel.EntityID> |
getEntityIDList(DataType type,
int index)
|
protected int |
getFieryness(int index)
|
protected int |
getHP(int index)
|
protected rescuecore2.worldmodel.EntityID |
getID(DataType dType,
int index)
Return data(EntityID) that have specified DataType and index. This method is only used in the class extending this class. |
int |
getMessageBitSize(java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
Return bit num of this message. |
BaseMessageType |
getMessageType()
Return type of this message. |
protected int |
getRepairCost(int index)
|
int |
getSendTime()
Return stem num that the message is created. |
protected int |
getSendTime(int index)
Return stem num that the message is created. |
protected int |
getWater(int index)
|
protected int |
getWaterPower(int index)
|
int |
hashCode()
|
boolean |
isSendable()
This method confirm whether data necessary for sending message are existing. If not, return false. |
protected void |
setCoorinate(rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> cor)
|
void |
setData(RCRSCSData<?> data)
Register data on the message. |
void |
setData(RCRSCSData<?> data,
int index)
Register data on the message using specified index. If message have some DataType.AREA, we can assign where to be setted the adding data. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BaseMessageType messageType
protected static final DataType[] COMMON_DATA_TYPE
protected java.util.List<RCRSCSData<?>> data
Constructor Detail |
---|
public RCRSCSMessage(BaseMessageType type, int time)
type
- time
- public RCRSCSMessage(java.util.List<RCRSCSData<?>> data, BaseMessageType type)
data
- type
- public RCRSCSMessage(BaseMessageType type, java.util.List<java.lang.Integer> bitList, int offset, java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
type
- bitList
- offset
- bitSizeMap
- Method Detail |
---|
public int getMessageBitSize(java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
bitSizeMap
-
public java.util.List<RCRSCSData<?>> getData()
IMessage
getData
in interface IMessage
public void setData(RCRSCSData<?> data)
IMessage
setData
in interface IMessage
data
- setted datapublic void setData(RCRSCSData<?> data, int index)
IMessage
setData
in interface IMessage
data
- setted datapublic boolean isSendable()
public BaseMessageType getMessageType()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected RCRSCSData<?> getData(DataType dType, int index)
dType
- index
-
protected rescuecore2.worldmodel.EntityID getID(DataType dType, int index)
dType
- index
-
protected int getHP(int index)
index
-
protected int getSendTime(int index)
index
-
public int getSendTime()
protected int getDamage(int index)
protected int getBuriedness(int index)
protected int getFieryness(int index)
protected int getWaterPower(int index)
protected int getWater(int index)
protected int getRepairCost(int index)
protected int getBrokenness(int index)
protected rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> getCoodinate(int index)
protected java.util.List<rescuecore2.worldmodel.EntityID> getEntityIDList(DataType type, int index)
protected void setCoorinate(rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> cor)
protected DataType[] getDataTypeArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |