OGS Java API Spec

ogs.core.details
Class Quantity

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

public class Quantity
extends Feature
implements Detail

A detail that quantifies some aspect of an object. Predefined aspects include age, height, and weight. These aspects are not validated in any way; user-defined aspects can also be substituted.


Field Summary
static int AGE
          A quantity that specifies an age.
static int HEIGHT
          A quantity that specifies height.
static int WEIGHT
          A quantity that specifies weight.
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
Quantity(int aspect, float value)
          Create a new quantity.
 
Method Summary
 int getAspect()
          Determine the aspect of this quantity.
 float getValue()
          Determine the value of this quantity.
 void setValue(float value)
          Change the value of this quantity.
 
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

AGE

public static final int AGE
A quantity that specifies an age.

See Also:
Constant Field Values

HEIGHT

public static final int HEIGHT
A quantity that specifies height.

See Also:
Constant Field Values

WEIGHT

public static final int WEIGHT
A quantity that specifies weight.

See Also:
Constant Field Values
Constructor Detail

Quantity

public Quantity(int aspect,
                float value)
Create a new quantity.

Parameters:
aspect - Aspect of quantity (AGE, HEIGHT, or WEIGHT).
value - Value of quantity.
Method Detail

getAspect

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

Returns:
Aspect of quantity (AGE, HEIGHT, or WEIGHT).

getValue

public float getValue()
Determine the value of this quantity.

Returns:
Value of quantity.

setValue

public void setValue(float value)
Change the value of this quantity.

Parameters:
value - Value of quantity.

OGS Java API Spec