|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.lehmannet.om.Angle
public class Angle
Angle is a wrapper class for angles used in the XML Schema definition. It stores an angle as double value along with the unit of the angle. All possible units for angles can be accessed by this objects constants.
| Field Summary | |
|---|---|
static java.lang.String |
ARCMINUTE
Angle unit arcminute. |
static java.lang.String |
ARCSECOND
Angle unit arcsecond. |
static java.lang.String |
DEGREE
Angle unit degree. |
static java.lang.String |
RADIANT
Angle unit radiant. |
static java.lang.String |
XML_ATTRIBUTE_UNIT
XML Attribute name for unit |
| Constructor Summary | |
|---|---|
Angle(double value,
java.lang.String unit)
|
|
Angle(org.w3c.dom.Node angleNode)
Constructs a new instance of an Angle from a given DOM target Element. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Overwrittes equals(Object) method from java.lang.Object. |
java.lang.String |
getUnit()
Returns the unit of the angles value. |
double |
getValue()
Returns the value of this angle. |
static boolean |
isValidUnit(java.lang.String unit)
Checks if a given String is a valid Angle unit. |
org.w3c.dom.Element |
setToXmlElement(org.w3c.dom.Element element)
Sets this Angle to an given XML DOM Element. |
double |
toArcMin()
Converts and sets this Angles value and unit to an Angle given in arcminutes. |
double |
toArcSec()
Converts and sets this Angles value and unit to an Angle given in arcseconds. |
double |
toDegree()
Converts and sets this Angles value and unit to an Angle given in degrees. |
double |
toRadiant()
Converts and sets this Angles value and unit to an Angle given in radiant. |
java.lang.String |
toString()
Overwrittes toString() method from java.lang.Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEGREE
degreeValue/180*PI.
public static final java.lang.String RADIANT
radiantValue/PI*180.
public static final java.lang.String ARCMINUTE
public static final java.lang.String ARCSECOND
public static final java.lang.String XML_ATTRIBUTE_UNIT
| Constructor Detail |
|---|
public Angle(org.w3c.dom.Node angleNode)
throws SchemaException
angleNode - The origin XML DOM angle Element
SchemaException - if given angleNode was null
public Angle(double value,
java.lang.String unit)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.ObjectObjectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The Object to compare this Angle with.
true if both Objects are instances from class Angle and
their values in degrees is equal.Objectpublic org.w3c.dom.Element setToXmlElement(org.w3c.dom.Element element)
element - The XML DOM Element this Angle belongs to
Elementpublic java.lang.String getUnit()
public double getValue()
public double toDegree()
public double toArcMin()
public double toArcSec()
public double toRadiant()
public static boolean isValidUnit(java.lang.String unit)
unit - A String which represents an angle unit
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||