com.tensegrity.graphics
Class Direction

java.lang.Object
  extended bycom.tensegrity.graphics.Direction

public class Direction
extends java.lang.Object

The class

Direction

is used to represent a direction using an angle in degrees.

Author:
BurkhardWick

Constructor Summary
Direction(double angle)
          Constructor
Direction(java.lang.String strValue)
          Constructor
 
Method Summary
static java.lang.String angleToString(double angle)
          Returns the string representation of the given angle
 boolean equals(java.lang.Object obj)
           
 double getAngle()
          Returns the angle of this direction
 int hashCode()
           
 void setAngle(double angle)
          Sets the angle of this direction
static double stringToAngle(java.lang.String val)
          Converts the given string value to the corresponding angle
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Direction

public Direction(double angle)
Constructor

Parameters:
angle - The angle of this direction in degrees

Direction

public Direction(java.lang.String strValue)
Constructor

Parameters:
strValue - A string representing an angle
Method Detail

setAngle

public void setAngle(double angle)
Sets the angle of this direction

Parameters:
angle - The angle to set

getAngle

public double getAngle()
Returns the angle of this direction

Returns:
the angle of this direction

angleToString

public static java.lang.String angleToString(double angle)
Returns the string representation of the given angle

Parameters:
angle - The angle to use
Returns:
The string representation of the angle

stringToAngle

public static double stringToAngle(java.lang.String val)
Converts the given string value to the corresponding angle

Parameters:
val - the string to parse
Returns:
the angle represented by the string

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.