game.interfaces
Interface Administration

All Known Subinterfaces:
AreaAdministration, Government, ProvinceAdministration, SquareAdministration
All Known Implementing Classes:
AbstractAdministration, AreaAdministrationClass, GovernmentClass, ProvinceAdministrationClass, SquareAdministrationClass

public interface Administration

Interface to allow manipulation of levels of government administration.


Method Summary
 void addEthnicPopulation(Ethnicity ethnicity, float population)
          Add an ethnic population.
 void economicsTurn()
          Perform one turn of economics.
 Square getCapital()
          Get the administrative capital square, identical to getSquare().
 Civilization getCivilization()
          Get the civilization.
 Economy getEconomy()
          Get the Economy associated with the GovtEntity
 float getEthnicDiscrimination(Ethnicity ethnicity)
          Return the ethnic discrimination for this ethnicity.
 Government getGovernment()
          Get the government.
 GovtEconOrders getGovtEconOrders()
          get economic orders to apply to this administration's economy
 float getIsolation()
          Return the isolation factor for this administration.
 java.lang.String getName()
          Return the name of this instance.
 int getNumberOfSquares()
          Return the number of squares controlled.
 float getPopulation()
          Return the population.
 Square getPort()
          Get the administrative main port.
 float getReligionEffect()
          Return the religion effect for this administration.
 float getReligiousDiscrimination(Religion religion)
          Return the religious discrimination for this ethnicity.
 Square getSquare()
          Get the administrative capital square, identical to getCapital().
 AreaAdministration getSuperior()
          Get superior.
 float getTaxRate()
          Getter for tax rate for this admin.
 boolean isGovernment()
          Whether this administration is the government.
 java.util.Iterator iterator()
          Iterate over sudordinates.
 boolean removeRecruits(float recruits)
          Remove recruits (for building a unit).
 void setEconomy(Economy value)
          Set the economy.
 void setName(java.lang.String value)
          Set the name of this instance.
 void setPort(Square value)
          Set the administrative main port.
 void setSquare(Square value)
          Set the administrative capital square.
 void setSuperior(AreaAdministration value)
          Set the superior administration.
 void setTaxRate(float r)
          Tax rate for this administration
 void setupEthnicPopulations()
          Compile all ethnic groups.
 int size()
          Number of immediate subordinates.
 java.util.Iterator squareIterator()
          Iterator over squares.
 void updateGovernmentPolicies(java.util.Map blockMap)
          Method calculates a fresh version of GovernmentPolicies and averages them to the parameter.
 

Method Detail

getCivilization

public Civilization getCivilization()
Get the civilization.

Returns:
the owning civilization.

getGovernment

public Government getGovernment()
Get the government.

Returns:
the owning government.

isGovernment

public boolean isGovernment()
Whether this administration is the government.


setName

public void setName(java.lang.String value)
Set the name of this instance.

Parameters:
value - the name to set.

getName

public java.lang.String getName()
Return the name of this instance.

Returns:
the name.

getCapital

public Square getCapital()
Get the administrative capital square, identical to getSquare().


getSquare

public Square getSquare()
Get the administrative capital square, identical to getCapital().


setSquare

public void setSquare(Square value)
Set the administrative capital square.


getPort

public Square getPort()
Get the administrative main port.


setPort

public void setPort(Square value)
Set the administrative main port.


getSuperior

public AreaAdministration getSuperior()
Get superior.

Returns:
the superior administration.

setSuperior

public void setSuperior(AreaAdministration value)
Set the superior administration.

Parameters:
value - the new superior.

iterator

public java.util.Iterator iterator()
Iterate over sudordinates.

Returns:
iterator over sudordinates.

squareIterator

public java.util.Iterator squareIterator()
Iterator over squares.

Returns:
iterator over squares.

size

public int size()
Number of immediate subordinates.

Returns:
number of immediate subordinates.

getIsolation

public float getIsolation()
Return the isolation factor for this administration.

Returns:
the isolation factor for this administration.

getNumberOfSquares

public int getNumberOfSquares()
Return the number of squares controlled.

Returns:
the number of squares controlled.

getEconomy

public Economy getEconomy()
Get the Economy associated with the GovtEntity

Returns:
the name of this GovtEntity.

setEconomy

public void setEconomy(Economy value)
Set the economy.

Parameters:
value - the Economy interface to add.

economicsTurn

public void economicsTurn()
Perform one turn of economics.


getGovtEconOrders

public GovtEconOrders getGovtEconOrders()
get economic orders to apply to this administration's economy


getTaxRate

public float getTaxRate()
Getter for tax rate for this admin. If tax rate is not set here method will go up the hierarchy to find appropriate tax rate.

Returns:
tax rate

setTaxRate

public void setTaxRate(float r)
Tax rate for this administration


getPopulation

public float getPopulation()
Return the population.

Returns:
the population.

removeRecruits

public boolean removeRecruits(float recruits)
Remove recruits (for building a unit).

Parameters:
recruits - the recruits to remove.
Returns:
true if there are enough recruits, if not, none are removed and false is returned.0

addEthnicPopulation

public void addEthnicPopulation(Ethnicity ethnicity,
                                float population)
Add an ethnic population.


setupEthnicPopulations

public void setupEthnicPopulations()
Compile all ethnic groups.


updateGovernmentPolicies

public void updateGovernmentPolicies(java.util.Map blockMap)
Method calculates a fresh version of GovernmentPolicies and averages them to the parameter.

Parameters:
blockMap - the map of policies averaged over previous ethnic groups.

getEthnicDiscrimination

public float getEthnicDiscrimination(Ethnicity ethnicity)
Return the ethnic discrimination for this ethnicity.

Returns:
the ethnic discrimination for this ethnicity.

getReligiousDiscrimination

public float getReligiousDiscrimination(Religion religion)
Return the religious discrimination for this ethnicity.

Returns:
the religious discrimination for this ethnicity.

getReligionEffect

public float getReligionEffect()
Return the religion effect for this administration.

Returns:
the religious effect for this administration.