Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_POPULATION_IMPACT |
Constructor and Description |
---|
Location(java.lang.String name,
Area area,
Requirement... requirements)
Constructor
|
Location(java.lang.String name,
int[][] positions,
Requirement... requirements)
Constructor
|
Location(java.lang.String name,
int x1,
int y1,
int x2,
int y2,
Requirement... requirements)
Constructor
|
Modifier and Type | Method and Description |
---|---|
AccountPrerequisites |
getAccountPrerequisites()
Gets the account prerequisites required to access this location
|
java.lang.String |
getName()
Gets the name of the location
|
float |
getPopulationImpact()
Gets how much the population at the locations affect the outcome.
|
Requirement[] |
getRequirements()
Gets the requirements to access the location
|
Location |
setAccountPrerequisites(AccountPrerequisites accountPrerequisites)
Sets the account prerequisites and returns this instance
|
Location |
setPopulationImpact(float populationImpact)
Sets the population impact and returns this instance
|
contains, contains, contains, contains, getCentralPosition, getPlane, getPolygon, getPositions, getRandomPosition, setPlane, toString
public static final float DEFAULT_POPULATION_IMPACT
public Location(java.lang.String name, int[][] positions, Requirement... requirements)
name
- The name of the locationpositions
- The positions of the locationrequirements
- The requirements to access the locationpublic Location(java.lang.String name, Area area, Requirement... requirements)
name
- The name of the locationarea
- The area of the locationrequirements
- The requirements to access the locationpublic Location(java.lang.String name, int x1, int y1, int x2, int y2, Requirement... requirements)
name
- The name of the locationx1
- Top left xy1
- Top left yx2
- Bottom right xy2
- Bottom right yrequirements
- The requirements to access the locationpublic java.lang.String getName()
public Requirement[] getRequirements()
public float getPopulationImpact()
This value is multiplied with the configuration impact to get a final impact per location.
See ActivityConfiguration.Builder.setPopulationImpact(float)
for more details.
public AccountPrerequisites getAccountPrerequisites()
public Location setPopulationImpact(float populationImpact)
populationImpact
- The population impactpublic Location setAccountPrerequisites(AccountPrerequisites accountPrerequisites)
accountPrerequisites
- The account prerequisites