cz.cuni.pogamut.MessageObjects
Class FlagInfo

java.lang.Object
  extended by cz.cuni.pogamut.MessageObjects.MessageObject
      extended by cz.cuni.pogamut.MessageObjects.FlagInfo
All Implemented Interfaces:
Located, Visible, java.io.Serializable, java.lang.Cloneable

public class FlagInfo
extends MessageObject
implements Located

FlagInfo contains all info about the flag in the CTF game mode

See Also:
Serialized Form

Field Summary
 int holderID
           
 java.lang.String holderUnrealID
           
 Triple location
           
 boolean reachable
           
 java.lang.String state
           
 int team
           
 
Fields inherited from class cz.cuni.pogamut.MessageObjects.MessageObject
ID, type, types, UnrealID, visible
 
Constructor Summary
FlagInfo()
           
FlagInfo(int ID, java.lang.String UnrealID, Triple location, boolean reachable, int team, int holderID, java.lang.String state, boolean visible, java.lang.String holderUnrealID)
           
 
Method Summary
 java.lang.Object clone()
          clone object - for hard copying
 boolean diff(MessageObject old)
          change this object that all properties that are same as old will be set to null or 0 or similar.
 Triple getLocation()
           
 boolean hasID()
           
 java.lang.String toString()
           
 void update(MessageObject newMsgObj)
          Writes non-null information from newMsgObj to current one.
 
Methods inherited from class cz.cuni.pogamut.MessageObjects.MessageObject
equals, getID, getType, getUnrealID, getVisibility, isVisible, setID, setType, setUnrealID, setVisible
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

location

public Triple location

holderID

public int holderID

holderUnrealID

public java.lang.String holderUnrealID

team

public int team

reachable

public boolean reachable

state

public java.lang.String state
Constructor Detail

FlagInfo

public FlagInfo()

FlagInfo

public FlagInfo(int ID,
                java.lang.String UnrealID,
                Triple location,
                boolean reachable,
                int team,
                int holderID,
                java.lang.String state,
                boolean visible,
                java.lang.String holderUnrealID)
Method Detail

hasID

public boolean hasID()
Overrides:
hasID in class MessageObject

toString

public java.lang.String toString()
Overrides:
toString in class MessageObject

clone

public java.lang.Object clone()
Description copied from class: MessageObject
clone object - for hard copying

Overrides:
clone in class MessageObject

diff

public boolean diff(MessageObject old)
Description copied from class: MessageObject
change this object that all properties that are same as old will be set to null or 0 or similar. in case all properties are same as old, return false, else true.
If old differs from current, update old.

Overrides:
diff in class MessageObject
Parameters:
old - Object we use as reference for change.
Returns:
true if the objects are not different

update

public void update(MessageObject newMsgObj)
Description copied from class: MessageObject
Writes non-null information from newMsgObj to current one. Remember that you have to overide this method if you creates a new descendant, so the Parser and Client can work correctly.

Overrides:
update in class MessageObject

getLocation

public Triple getLocation()
Specified by:
getLocation in interface Located