OGS Java API Spec

ogs.magic
Class AbsoluteRange

java.lang.Object
  |
  +--ogs.magic.Range
        |
        +--ogs.magic.AbsoluteRange
Direct Known Subclasses:
LevelRange

public class AbsoluteRange
extends Range

A spell range expressed in an absolute distance. The unit of distance is locale dependent.


Field Summary
 
Fields inherited from class ogs.magic.Range
ABSOLUTE, CLOSE, LONG, MEDIUM, PERSONAL, TOUCH, UNLIMITED
 
Constructor Summary
protected AbsoluteRange(int type, double distance)
          Create a new absolute range.
 
Method Summary
static AbsoluteRange Absolute(double distance)
          Create an absolute range using the specified distance.
 double getDistance()
          Determine the distance of this range.
 
Methods inherited from class ogs.magic.Range
getType, Personal, Touch, Unlimited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsoluteRange

protected AbsoluteRange(int type,
                        double distance)
Create a new absolute range.

Parameters:
type - Type of range (ABSOLUTE, CLOSE, MEDIUM, or LONG).
distance - Distance of this range.
Throws:
IllegalArgumentException - If type is not a valid range type.
Method Detail

Absolute

public static AbsoluteRange Absolute(double distance)
Create an absolute range using the specified distance.

Parameters:
distance - Distance of this range.

getDistance

public double getDistance()
Determine the distance of this range.

Returns:
Distance of this range.

OGS Java API Spec