|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.map.SubProvince
public final class SubProvince
The SubProvince class represents a subprovince of a province. E.g. has the province Bulgaria the three subprovinces east coast, south coast, and land.
| Method Summary | |
|---|---|
boolean |
canConvoy()
Returns true if a unit in this subprovince can convoy an army |
boolean |
canMoveTo(SubProvince dest)
Can a unit in this subprovince move to dest? |
boolean |
canSupport(Province dest)
Can a unit support the province dest? |
int |
compareTo(java.lang.Object obj)
Compares two SubProvinces by Province, Coast |
boolean |
equals(java.lang.Object obj)
Compares two SubProvinces by Province, Coast |
java.lang.String |
getAbbreviation()
Returns the abbreviation of the subprovince |
int |
getCoast()
Returns the coast |
java.util.SortedSet |
getMoves()
Returns all possible destination SubProvinces |
Province |
getProvince()
Returns the province |
java.lang.String |
getUnitText()
Returns a text for a unit in this sub province, e.g. |
int |
hashCode()
Returns a hashcode for this SubProvince. |
boolean |
isCoast()
Is this subprovince a real coast |
boolean |
isSea()
True if it is sea or any coast. |
java.lang.String |
toString()
Returns the name of the subprovince |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public Province getProvince()
public int getCoast()
public boolean isSea()
public java.util.SortedSet getMoves()
public boolean canMoveTo(SubProvince dest)
public boolean canSupport(Province dest)
public boolean canConvoy()
public java.lang.String getUnitText()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getAbbreviation()
public boolean isCoast()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||