org.starhope.appius.game.intangible
Class EquipAs

java.lang.Object
  extended by org.starhope.appius.game.intangible.EquipAs

public class EquipAs
extends Object

This is basically a super-Enum which contains the types of equipment that are hard-coded in the database, and can tell us a few things about them.

Author:
brpocock

Nested Class Summary
static class EquipAs.Values
          This is the real, nested enum.
 
Field Summary
private  EquipAs.Values value
          The value that makes this act like a super-Enum
 
Constructor Summary
EquipAs(EquipAs.Values value)
           
EquipAs(String value)
          Instantiates based upon a string, e.g.
 
Method Summary
 boolean avatarCanEquip()
           
 EquipAs.Values getValue()
           
 boolean roomCanEquip()
           
 String toString()
          Special note: we use ONE_HAND and TWO_HAND internally (Java identifier rules) but export 1HAND and 2HAND to SQL/JSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private final EquipAs.Values value
The value that makes this act like a super-Enum

Constructor Detail

EquipAs

public EquipAs(String value)
Instantiates based upon a string, e.g. from JSON or database

Parameters:
value - The string in question

EquipAs

public EquipAs(EquipAs.Values value)
Parameters:
value - The value of this super-enum
Method Detail

avatarCanEquip

public boolean avatarCanEquip()
Returns:
whether the item is something that can be equipped by / applied to an avatar. If not, it must apply to decorated rooms.

getValue

public EquipAs.Values getValue()
Returns:
the value

roomCanEquip

public boolean roomCanEquip()
Returns:
true if this is something that applies to decorated rooms, and not avatars.

toString

public String toString()
Special note: we use ONE_HAND and TWO_HAND internally (Java identifier rules) but export 1HAND and 2HAND to SQL/JSON

Overrides:
toString in class Object
See Also:
Object.toString()