cz.cuni.amis.pogamut.defcon.communication.messages.infos
Class DefConViewableObject

Package class diagram package DefConViewableObject
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConObject
      extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConViewableObject
All Implemented Interfaces:
IWorldObject, ILocated, IViewable, ICompositeWorldObject
Direct Known Subclasses:
City, DefConUnitObject, Explosion, Fleet, Gunshot, Saucer, Tornado

public abstract class DefConViewableObject
extends DefConObject
implements IViewable, ILocated

Viewable version of the DefConObject - implements IViewable providing a way to tell whether the object is visible on the map.

Author:
Jimmy, Black_Hand

Field Summary
protected  DefConLocation location
          Contains location of this object.
protected  int teamId
          Contains the id of this object's team.
protected  boolean visible
          Holds the information whether the object is visible on the map.
 
Constructor Summary
DefConViewableObject(DefConViewableObject original)
          Creates a new DefConViewableObject object.
DefConViewableObject(int id, UnitType type, int teamId, DefConLocation location, boolean visible, double time)
          Creates new instance of message DefConViewAbleObject with specific id.
 
Method Summary
 ILocalWorldObject getLocal()
          DOCUMENT ME!
 DefConLocation getLocation()
          Returns locations of this object.
 ISharedWorldObject getShared()
          DOCUMENT ME!
 IStaticWorldObject getStatic()
          DOCUMENT ME!
 String getStringizedFields()
          DOCUMENT ME!
 int getTeamId()
          Returns team id of this object.
 boolean isVisible()
          Is the object visible on the DefCon map?
protected  boolean setVisibility(boolean visible)
          Sets the visibility of this object.
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConObject
createDestroyedEvent, createUpdateEvent, getDestroyed, getId, getLastSeenTime, getSimTime, getType, setLastSeenTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
getId, getSimTime
 

Field Detail

visible

protected boolean visible
Holds the information whether the object is visible on the map.


location

protected DefConLocation location
Contains location of this object. Exposed via getLocation().


teamId

protected int teamId
Contains the id of this object's team. Exposed by getTeamId().

Constructor Detail

DefConViewableObject

public DefConViewableObject(int id,
                            UnitType type,
                            int teamId,
                            DefConLocation location,
                            boolean visible,
                            double time)
Creates new instance of message DefConViewAbleObject with specific id. Example object from the world.

Parameters:
id -
type - DOCUMENT ME!
teamId - DOCUMENT ME!
location - DOCUMENT ME!
visible - visibility of this object
time -

DefConViewableObject

public DefConViewableObject(DefConViewableObject original)
Creates a new DefConViewableObject object.

Parameters:
original - DOCUMENT ME!
Method Detail

isVisible

public boolean isVisible()
Is the object visible on the DefCon map?

Specified by:
isVisible in interface IViewable
Returns:
visibility

setVisibility

protected boolean setVisibility(boolean visible)
Sets the visibility of this object.

Parameters:
visible -
Returns:
visibility

getTeamId

public int getTeamId()
Returns team id of this object.

Returns:
id

getLocation

public DefConLocation getLocation()
Returns locations of this object.

Specified by:
getLocation in interface ILocated
Returns:
location

getStringizedFields

public String getStringizedFields()
DOCUMENT ME!

Overrides:
getStringizedFields in class DefConObject
Returns:
DOCUMENT ME!

getLocal

public ILocalWorldObject getLocal()
DOCUMENT ME!

Specified by:
getLocal in interface ICompositeWorldObject
Returns:
DOCUMENT ME!

getShared

public ISharedWorldObject getShared()
DOCUMENT ME!

Specified by:
getShared in interface ICompositeWorldObject
Returns:
DOCUMENT ME!

getStatic

public IStaticWorldObject getStatic()
DOCUMENT ME!

Specified by:
getStatic in interface ICompositeWorldObject
Returns:
DOCUMENT ME!


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.