games.strategy.triplea.util
Class UnitCategory
java.lang.Object
games.strategy.triplea.util.UnitCategory
- All Implemented Interfaces:
- java.lang.Comparable
public class UnitCategory
- extends java.lang.Object
- implements java.lang.Comparable
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
UnitCategory
public UnitCategory(Unit unit,
boolean categorizeDependents,
boolean categorizeMovement)
UnitCategory
public UnitCategory(Unit unit,
java.util.Collection<Unit> dependents,
int movement)
UnitCategory
public UnitCategory(UnitType type,
PlayerID owner)
UnitCategory
public UnitCategory(Unit unit,
java.util.Collection<Unit> dependents,
int movement,
boolean damaged)
getDamaged
public boolean getDamaged()
isTwoHit
public boolean isTwoHit()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
equalsIgnoreDamaged
public boolean equalsIgnoreDamaged(UnitCategory other)
equalsIgnoreMovement
public boolean equalsIgnoreMovement(UnitCategory other)
equalsIgnoreDependents
public boolean equalsIgnoreDependents(UnitCategory other)
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getDependents
public java.util.Collection<UnitOwner> getDependents()
- Collection of UnitOwners, the type of our dependents, not the dependents
getUnits
public java.util.List<Unit> getUnits()
getMovement
public int getMovement()
getOwner
public PlayerID getOwner()
addUnit
public void addUnit(Unit unit)
getType
public UnitType getType()
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo in interface java.lang.Comparable