cz.cuni.amis.pogamut.ut2004.agent.module.sensor
Class WeaponPref

java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref

public class WeaponPref
extends java.lang.Object

Class that contains a weapon preference. I.e., stating:

  1. weapon to be used
  2. primary/secondary mode


Constructor Summary
WeaponPref(ItemType weapon)
          Use 'weapon' with primary-firing-mode.
WeaponPref(ItemType weapon, boolean primary)
          Use 'weapon' and the concrete mode.
WeaponPref(Weapon weapon, boolean primary)
          Use 'weapon' and the concrete mode.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 ItemType getWeapon()
          Which weapon to choose.
 int hashCode()
           
 boolean isPrimary()
          Whether to use primary firing mode?
 boolean isSecondary()
          Whether to use secondary firing mode?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeaponPref

public WeaponPref(ItemType weapon,
                  boolean primary)
Use 'weapon' and the concrete mode.

Parameters:
weapon -
primary - true == use primary firing mode, false == use secondary firing mode

WeaponPref

public WeaponPref(ItemType weapon)
Use 'weapon' with primary-firing-mode.

Parameters:
weapon -
primary - true == use primary firing mode, false == use secondary firing mode

WeaponPref

public WeaponPref(Weapon weapon,
                  boolean primary)
Use 'weapon' and the concrete mode.

Parameters:
weapon -
primary - true == use primary firing mode, false == use secondary firing mode
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getWeapon

public ItemType getWeapon()
Which weapon to choose.

Returns:

isPrimary

public boolean isPrimary()
Whether to use primary firing mode?

Returns:

isSecondary

public boolean isSecondary()
Whether to use secondary firing mode?

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object