org.jscience.chemistry.gui.extended.geometry
Class Angle

java.lang.Object
  extended by org.jscience.chemistry.gui.extended.geometry.Angle

public class Angle
extends java.lang.Object

A class that provides mathematical definition of geometric angle


Field Summary
protected  java.lang.String comment
          error/warning message, or other comment
protected  double value
          value of the angle
 
Constructor Summary
Angle()
          default constructor: value is 0.0;
Angle(Angle angle)
          copy constructor
Angle(double value)
          constructor
Angle(double value, boolean inDegree)
          full constructor
 
Method Summary
 double degreeValue()
          Return angle value in degree unit
 java.lang.String getComment()
          Return comment
 double radValue()
          Return angle value in rad unit
 void setComment(java.lang.String comment)
          Set comment
 void setValue(double value)
          Set value of the angle
 void setValue(double value, boolean inDegree)
          Set value of the angle
 java.lang.String toString()
          Return string representation of angle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected double value
value of the angle


comment

protected java.lang.String comment
error/warning message, or other comment

Constructor Detail

Angle

public Angle()
default constructor: value is 0.0;


Angle

public Angle(double value,
             boolean inDegree)
full constructor

Parameters:
angle -
inDegree - boolean flag indicating value in degree unit

Angle

public Angle(double value)
constructor

Parameters:
angle - value in rad unit

Angle

public Angle(Angle angle)
copy constructor

Parameters:
a - the angle to be copied
Method Detail

radValue

public double radValue()
Return angle value in rad unit


degreeValue

public double degreeValue()
Return angle value in degree unit


getComment

public java.lang.String getComment()
Return comment


toString

public java.lang.String toString()
Return string representation of angle

Overrides:
toString in class java.lang.Object

setValue

public void setValue(double value,
                     boolean inDegree)
Set value of the angle

Parameters:
value - angle's value to be set
inDegree - true if value is in degree unit, false if in rad unit

setValue

public void setValue(double value)
Set value of the angle

Parameters:
value - angle's value to be set, in rad unit

setComment

public void setComment(java.lang.String comment)
Set comment

Parameters:
comment -
See Also:
getComment