org.minetti.astrodevice.server.hibernate.object.embedded
Class EmbeddedSexagesimalCoordinate

java.lang.Object
  extended by org.minetti.astrodevice.server.hibernate.object.embedded.EmbeddedSexagesimalCoordinate
All Implemented Interfaces:
Serializable

@Embeddable
public final class EmbeddedSexagesimalCoordinate
extends Object
implements Serializable

Object representing a coordinate stored as sexagesimal format (embeddable class for Hibernate framework).

Author:
Jean-Philippe MINETTI
See Also:
Serialized Form

Constructor Summary
EmbeddedSexagesimalCoordinate()
          Constructor.
EmbeddedSexagesimalCoordinate(boolean hourAngle, org.minetti.astrodevice.common.coordinate.Coordinate coordinate)
          Constructor.
 
Method Summary
 int getAngle()
          Returns the angle part of coordinate.
 int getMinutes()
          Returns the minutes part of coordinate.
 double getSeconds()
          Returns the seconds part of coordinate.
 void setAngle(int angle)
          Sets the angle part of coordinate.
 void setMinutes(int minutes)
          Sets the minutes part of coordinate.
 void setSeconds(double seconds)
          Sets the seconds part of coordinate.
 org.minetti.astrodevice.common.coordinate.Coordinate toCoordinate(boolean hourAngle)
          Returns the coordinate.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddedSexagesimalCoordinate

public EmbeddedSexagesimalCoordinate()
Constructor.


EmbeddedSexagesimalCoordinate

public EmbeddedSexagesimalCoordinate(boolean hourAngle,
                                     org.minetti.astrodevice.common.coordinate.Coordinate coordinate)
Constructor.

Parameters:
hourAngle - TRUE if the coordinate must be an hour angle and therefore expressed in hours.
coordinate - Coordinate.
Method Detail

getAngle

public int getAngle()
Returns the angle part of coordinate.

Returns:
Angle part of coordinate in degrees (°) or hours (h).

setAngle

public void setAngle(int angle)
Sets the angle part of coordinate.

Parameters:
angle - Angle part of coordinate in degrees (°) or hours (h).

getMinutes

public int getMinutes()
Returns the minutes part of coordinate.

Returns:
Minutes part of coordinate (′).

setMinutes

public void setMinutes(int minutes)
Sets the minutes part of coordinate.

Parameters:
minutes - Minutes part of coordinate (′).

getSeconds

public double getSeconds()
Returns the seconds part of coordinate.

Returns:
Seconds part of coordinate (″).

setSeconds

public void setSeconds(double seconds)
Sets the seconds part of coordinate.

Parameters:
seconds - Seconds part of coordinate (″).

toCoordinate

public org.minetti.astrodevice.common.coordinate.Coordinate toCoordinate(boolean hourAngle)
Returns the coordinate.

Parameters:
hourAngle - TRUE if the coordinate must be an hour angle and therefore expressed in hours.
Returns:
Coordinate.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 astroDevice. All Rights Reserved.