OGS Java API Spec

ogs.core.details
Class Description

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

public class Description
extends Feature
implements Detail

A detail that describes some aspect of an object. Predefined aspects include personality, appearance, and background. These aspects are not validated in any way; user-defined aspects can also be substituted.


Field Summary
static int APPEARANCE
          A description of appearance.
static int BACKGROUND
          A description of background.
static int NAME
          A name.
static int PERSONALITY
          A description of personality.
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
Description(int aspect)
          Create a new description.
Description(int aspect, String text)
          Create a new description.
 
Method Summary
 int getAspect()
          Determine the aspect of this description.
 String getText()
          Determine the text of this description.
 void setText(String text)
          Change the text of this description.
 
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, toString, wait, wait, wait
 

Field Detail

NAME

public static final int NAME
A name.

See Also:
Constant Field Values

PERSONALITY

public static final int PERSONALITY
A description of personality.

See Also:
Constant Field Values

APPEARANCE

public static final int APPEARANCE
A description of appearance.

See Also:
Constant Field Values

BACKGROUND

public static final int BACKGROUND
A description of background.

See Also:
Constant Field Values
Constructor Detail

Description

public Description(int aspect)
Create a new description. The text of the description is an empty string.

Parameters:
aspect - Aspect of description (NAME, PERSONALITY, etc,).

Description

public Description(int aspect,
                   String text)
Create a new description.

Parameters:
aspect - Aspect of description (NAME, PERSONALITY, etc,).
text - Text of description.
Method Detail

getAspect

public int getAspect()
Determine the aspect of this description.

Returns:
Aspect of description (NAME, PERSONALITY, etc,).

getText

public String getText()
Determine the text of this description.

Returns:
Text of description.

setText

public void setText(String text)
Change the text of this description.

Parameters:
text - Text of description.

OGS Java API Spec