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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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.