|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.geometry.Extent
public class Extent
A measurement such as a length, area, or volume. All zero extents are considered equal, regardless of the unit of measurement. For this implementation only extents of the same unit and degree should be compared, although consistent, if inaccurate, values will still be obtained otherwise.
| Field Summary | |
|---|---|
static Extent |
ZERO_EXTENT1
A convenience one-dimensional extent of zero pixels. |
| Constructor Summary | |
|---|---|
Extent(double value)
Value constructor for a one-dimensional pixel extent. |
|
Extent(double value,
Unit unit)
Value and unit constructor with a degree of one. |
|
Extent(double value,
Unit unit,
int degree)
Value, unit, and degree constructor. |
|
| Method Summary | |
|---|---|
int |
compareTo(Extent extent)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. |
int |
getDegree()
|
Unit |
getUnit()
|
double |
getValue()
|
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Extent ZERO_EXTENT1
| Constructor Detail |
|---|
public Extent(double value)
value - The value of the extent.
public Extent(double value,
Unit unit)
value - The value of the extent.unit - The unit with which the extent is measured.
java.lang.NullPointerException - if the given unit is null.
public Extent(double value,
Unit unit,
int degree)
value - The value of the extent.unit - The unit with which the extent is measured.degree - The degree of dimensions of the measurement.
java.lang.NullPointerException - if the given unit is null.
java.lang.IllegalArgumentException - if the degree is non-positive.| Method Detail |
|---|
public double getValue()
public Unit getUnit()
public int getDegree()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The reference object with which to compare.
true if this object is equivalent to the given object.public int compareTo(Extent extent)
compareTo in interface java.lang.Comparable<Extent>extent - The object to be compared.
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||