de.adom.jade.beings
Class Gender

java.lang.Object
  extended by de.adom.jade.beings.Gender

public final class Gender
extends java.lang.Object

Encapsulates all data about the gender of living beings.


Field Summary
static Gender FEMALE
          the female gender
static Gender MALE
          the male gender
static Gender NEUTER
          the neutral gender
 
Constructor Summary
Gender(java.lang.String attribute, int[] modifiers)
          Creates a new gender instance.
 
Method Summary
 int getAttributeModifier(int attributeIndex)
          Returns the attribute modifier for a given gender.
 java.lang.String toString()
          Returns the attribute representation of the given gender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MALE

public static final Gender MALE
the male gender


FEMALE

public static final Gender FEMALE
the female gender


NEUTER

public static final Gender NEUTER
the neutral gender

Constructor Detail

Gender

public Gender(java.lang.String attribute,
              int[] modifiers)
Creates a new gender instance.

Parameters:
attribute - the gender attribute
Method Detail

getAttributeModifier

public int getAttributeModifier(int attributeIndex)
Returns the attribute modifier for a given gender.

Parameters:
attributeIndex - the index of the attribute
Returns:
the modifier

toString

public java.lang.String toString()
Returns the attribute representation of the given gender. This can be an empty string!

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the given gender