OGS Java API Spec

ogs.core.details
Class Gender

java.lang.Object
  |
  +--ogs.support.Object
        |
        +--ogs.core.Feature
              |
              +--ogs.core.details.Gender
All Implemented Interfaces:
Detail, EventListener

public class Gender
extends Feature
implements Detail

A detail that identifies the sex of a creature. Genders are normally associated only with characters or creatures. It can be used to determine physical characteristics of a creature.


Field Summary
static int BOTH
          A bisexual gender, both male and female.
static int FEMALE
          A female gender.
static int MALE
          A male gender.
static int NONE
          An asexual gender, neither male or female.
static int UNKNOWN
          An unknown or undefined gender.
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
Gender(int value)
          Create a new gender.
 
Method Summary
 int getValue()
          Determine the gender.
 String toString()
          Format a string representation of this gender.
 
Methods inherited from class ogs.core.Feature
attachObject, canAttach, canDetach, detachObject, getObject
 
Methods inherited from class ogs.support.Object
addListener, handleEvent, notifyListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
An unknown or undefined gender.

See Also:
Constant Field Values

MALE

public static final int MALE
A male gender.

See Also:
Constant Field Values

FEMALE

public static final int FEMALE
A female gender.

See Also:
Constant Field Values

NONE

public static final int NONE
An asexual gender, neither male or female.

See Also:
Constant Field Values

BOTH

public static final int BOTH
A bisexual gender, both male and female.

See Also:
Constant Field Values
Constructor Detail

Gender

public Gender(int value)
Create a new gender. If the specified value is invalid, the value of the gender is set to UNKNOWN by default.

Parameters:
value - MALE, FEMALE, NONE, BOTH, or UNKNOWN.
Method Detail

getValue

public int getValue()
Determine the gender.

Returns:
MALE, FEMALE, NONE, BOTH, or UNKNOWN.

toString

public String toString()
Format a string representation of this gender. The string contains the value of this gender.

Overrides:
toString in class Object
Returns:
A string representation of this gender.

OGS Java API Spec