games.strategy.triplea.util
Class UnitCategory

java.lang.Object
  extended by games.strategy.triplea.util.UnitCategory
All Implemented Interfaces:
java.lang.Comparable

public class UnitCategory
extends java.lang.Object
implements java.lang.Comparable


Constructor Summary
UnitCategory(Unit unit, boolean categorizeDependents, boolean categorizeMovement)
           
UnitCategory(Unit unit, java.util.Collection<Unit> dependents, int movement)
           
UnitCategory(Unit unit, java.util.Collection<Unit> dependents, int movement, boolean damaged)
           
UnitCategory(UnitType type, PlayerID owner)
           
 
Method Summary
 void addUnit(Unit unit)
           
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 boolean equalsIgnoreDamaged(UnitCategory other)
           
 boolean equalsIgnoreDependents(UnitCategory other)
           
 boolean equalsIgnoreMovement(UnitCategory other)
           
 boolean getDamaged()
           
 java.util.Collection<UnitOwner> getDependents()
          Collection of UnitOwners, the type of our dependents, not the dependents
 int getMovement()
           
 PlayerID getOwner()
           
 UnitType getType()
           
 java.util.List<Unit> getUnits()
           
 int hashCode()
           
 boolean isTwoHit()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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