cz.cuni.pogamut.MessageObjects
Class DominationPoint

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

public class DominationPoint
extends MessageObject

Domination point contains following important properties:

See Also:
Serialized Form

Field Summary
 int controller
          Which team controls this point.
private  int hashCode
          hash code for astar
private  boolean hashComputed
          thanks to weird hashcode flag if hashcode has been specified
 Triple location
          Location of navpoint
 boolean reachable
          Is there no obstacle in way bot-navpoint = can bot run there directly?
 
Fields inherited from class cz.cuni.pogamut.MessageObjects.MessageObject
ID, type, types, UnrealID, visible
 
Constructor Summary
DominationPoint()
           
DominationPoint(int ID, java.lang.String UnrealID, Triple location, boolean reachable, boolean visible, int controller, int hashCode)
           
 
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.
private  int getHashCode()
           
 Triple getLocation()
           
 int hashCode()
           
 boolean hasID()
           
 boolean isReachable()
           
 boolean isVisible()
           
 void setLocation(Triple newLocation)
           
 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, setID, setType, setUnrealID, setVisible
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

controller

public int controller
Which team controls this point.


location

public Triple location
Location of navpoint


hashComputed

private boolean hashComputed
thanks to weird hashcode flag if hashcode has been specified


hashCode

private int hashCode
hash code for astar


reachable

public boolean reachable
Is there no obstacle in way bot-navpoint = can bot run there directly?

Constructor Detail

DominationPoint

public DominationPoint(int ID,
                       java.lang.String UnrealID,
                       Triple location,
                       boolean reachable,
                       boolean visible,
                       int controller,
                       int hashCode)

DominationPoint

public DominationPoint()
Method Detail

hasID

public boolean hasID()
Overrides:
hasID in class MessageObject

getHashCode

private int getHashCode()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

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

Overrides:
clone in class MessageObject

getLocation

public Triple getLocation()

setLocation

public void setLocation(Triple newLocation)

isReachable

public boolean isReachable()

isVisible

public boolean isVisible()
Overrides:
isVisible 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

toString

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