spellcast.beings
Class Gender

java.lang.Object
  extended by spellcast.beings.Gender
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Female, GenderNone, Male, Neuter

public abstract class Gender
extends java.lang.Object
implements java.io.Serializable

Author:
Barrie Treloar
See Also:
Serialized Form

Field Summary
static Gender FEMALE
           
static java.lang.String[] GENDERS_AS_STRINGS
          A list of genders that are available in their string form.
static Gender MALE
           
static Gender NEUTER
           
static Gender NONE
           
 
Constructor Summary
Gender(java.lang.String genderString)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
static Gender getGender(java.lang.String genderString)
          Given a string return the matching gender object (case is insensitive).
 java.lang.String getGenderString()
          Get the value of genderString.
abstract  java.lang.String pro_he()
          Return the "he" like pronoun.
abstract  java.lang.String pro_him()
          Return the "him" like pronoun.
abstract  java.lang.String pro_himself()
          Return the "himself" like pronoun.
abstract  java.lang.String pro_his()
          Return the "his" like pronoun.
 void setGenderString(java.lang.String v)
          Set the value of genderString.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MALE

public static final Gender MALE

FEMALE

public static final Gender FEMALE

NEUTER

public static final Gender NEUTER

NONE

public static final Gender NONE

GENDERS_AS_STRINGS

public static final java.lang.String[] GENDERS_AS_STRINGS
A list of genders that are available in their string form. These are "Male", "Female", "Neuter", "None".

Constructor Detail

Gender

public Gender(java.lang.String genderString)
Method Detail

getGenderString

public java.lang.String getGenderString()
Get the value of genderString.

Returns:
value of genderString.

setGenderString

public void setGenderString(java.lang.String v)
Set the value of genderString.

Parameters:
v - Value to assign to genderString.

pro_himself

public abstract java.lang.String pro_himself()
Return the "himself" like pronoun.


pro_him

public abstract java.lang.String pro_him()
Return the "him" like pronoun.


pro_he

public abstract java.lang.String pro_he()
Return the "he" like pronoun.


pro_his

public abstract java.lang.String pro_his()
Return the "his" like pronoun.


equals

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

getGender

public static Gender getGender(java.lang.String genderString)
Given a string return the matching gender object (case is insensitive). If unknown gender return null.

Parameters:
genderString - must be on of the strings listed in GENDERS_AS_STRINGS
Returns:
the matching Gender object for the string or null if unkown.


Copyright © 2001-2005 Spellcast. All Rights Reserved.