Package net.sf.freecol.common.model
Class EuropeWas
- java.lang.Object
-
- net.sf.freecol.common.model.EuropeWas
-
public class EuropeWas extends java.lang.Object
Helper container to remember the Europe state prior to some change, and fire off any consequent property changes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
fireChanges()
Fire any property changes resulting from actions in Europe.Unit
getNewUnit()
Gets a unit added to Europe since this EuropeWas was sampled.
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
europe
private final Europe europe
The Europe to remember.
-
unitCount
private final int unitCount
The initial number of units in the Europe.
-
-
Constructor Detail
-
EuropeWas
public EuropeWas(Europe europe)
Create a new wrapper to remember the state of Europe.- Parameters:
europe
- TheEurope
to remember.
-
-
Method Detail
-
getNewUnit
public Unit getNewUnit()
Gets a unit added to Europe since this EuropeWas was sampled. As long there is at least one new unit, pick the one with the highest numeric id.- Returns:
- The newest
Unit
or null if none has been added.
-
fireChanges
public boolean fireChanges()
Fire any property changes resulting from actions in Europe.- Returns:
- True if something changed.
-
-