civquest.gameChange
Class AbstractUnitChange

java.lang.Object
  extended bycivquest.gameChange.AbstractUnitChange
All Implemented Interfaces:
GameChange, UnitChange
Direct Known Subclasses:
MarkUnit, ResetUnitTime, UnmarkAllUnits, UnmarkUnit

public abstract class AbstractUnitChange
extends java.lang.Object
implements UnitChange


Field Summary
protected  java.lang.String name
           
protected  long[] unitIDs
           
 
Fields inherited from interface civquest.gameChange.UnitChange
ADD_UNIT, NOT_KNOWN, RESET_UNIT_TIME
 
Constructor Summary
AbstractUnitChange(long unitID)
           
AbstractUnitChange(long[] unitIDs)
           
 
Method Summary
 long[] getUnitIDs()
          Returns the information about all units (usually exactly one unit will be affected, but there may be special cases) affected by this UnitChange.
 void notifyListeners()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface civquest.gameChange.GameChange
execute
 

Field Detail

unitIDs

protected long[] unitIDs

name

protected java.lang.String name
Constructor Detail

AbstractUnitChange

public AbstractUnitChange(long unitID)

AbstractUnitChange

public AbstractUnitChange(long[] unitIDs)
Method Detail

getUnitIDs

public long[] getUnitIDs()
Description copied from interface: UnitChange
Returns the information about all units (usually exactly one unit will be affected, but there may be special cases) affected by this UnitChange. Implementors may define which index has which meaning. If a value is >= 0, it is the ID of a unit affected by this UnitChange. If a value is < 0, it indicates some special case/event according to the constants defined above.

Specified by:
getUnitIDs in interface UnitChange
Returns:
an array as specified above

notifyListeners

public void notifyListeners()
Specified by:
notifyListeners in interface GameChange