public class PenaltyData
extends java.lang.Object
| Constructor and Description |
|---|
PenaltyData(java.util.List<Territory> territories) |
| Modifier and Type | Method and Description |
|---|---|
double |
getPenaltyValue(java.lang.String territory)
Get the penalty function for a territory by territory name
|
double |
getPenaltyValue(Territory territory)
Get the penalty function for a territory object
|
void |
setPenaltyData(java.lang.String territory,
double penaltyValue)
Sets the penalty function for a territory with the given name
|
void |
setPenaltyData(Territory territory,
double penaltyValue)
Sets the penalty function for a territory for a given territory object
|
java.lang.String |
toString() |
public PenaltyData(java.util.List<Territory> territories)
public double getPenaltyValue(java.lang.String territory)
territory - name of the territorypublic double getPenaltyValue(Territory territory)
territory - territory objectpublic void setPenaltyData(java.lang.String territory,
double penaltyValue)
territory - name of the territorypenaltyValue - value of the penalty functionpublic void setPenaltyData(Territory territory, double penaltyValue)
territory - territory objectpenaltyValue - penalty function valuepublic java.lang.String toString()
toString in class java.lang.Object