fr.ird.type
Class SexagecimalPosition

java.lang.Object
  extended by fr.ird.type.SexagecimalPosition
All Implemented Interfaces:
Serializable

public class SexagecimalPosition
extends Object
implements Serializable

Le modèle d'une position au format sexagecimal (degre - minute - seconde).

Since:
1.2
Author:
chemit
See Also:
Serialized Form

Field Summary
protected  Integer degre
           
protected  Integer minute
           
protected  Integer seconde
           
 
Constructor Summary
protected SexagecimalPosition()
           
 
Method Summary
 boolean equals(Object obj)
           
 Integer getDegre()
           
 Integer getMinute()
           
 Integer getSeconde()
           
 int hashCode()
           
 boolean isNull()
           
 void setDegre(Integer degre)
           
 void setMinute(Integer minute)
           
 void setSeconde(Integer seconde)
           
 Float toDecimal()
           
 String toString()
           
 void update(Float decimal)
          Mets a jour les composants de la position a partir d'une valeur decimal.
static SexagecimalPosition valueOf(Float decimal)
          Methode statique de fabrique de position a partir d'une valeur du format decimal.
static SexagecimalPosition valueOf(int d, int m, int s)
          Methode statique de fabrique de position a partir d'une valeur du format degre-minute-seconde.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

degre

protected Integer degre

minute

protected Integer minute

seconde

protected Integer seconde
Constructor Detail

SexagecimalPosition

protected SexagecimalPosition()
Method Detail

valueOf

public static SexagecimalPosition valueOf(Float decimal)
Methode statique de fabrique de position a partir d'une valeur du format decimal.

Note : Si la valeur (au format decimal) vaut null, alors on reinitialise les composants de la position a null et la methode isNull() vaudra alors true.

Parameters:
decimal - la valeur au format decimal
Returns:
une nouvelle instance de position convertie

valueOf

public static SexagecimalPosition valueOf(int d,
                                          int m,
                                          int s)
Methode statique de fabrique de position a partir d'une valeur du format degre-minute-seconde.

Parameters:
d - la valeur des degres
m - la valeur des minutes
s - la valeur des secondes
Returns:
une nouvelle instance de position convertie

isNull

public boolean isNull()
Returns:
true si aucune composante n'est renseigné, false autrement.

update

public void update(Float decimal)
Mets a jour les composants de la position a partir d'une valeur decimal.

Note : Si la valeur (au format decimal) vaut null, alors on reinitialise les composants de la position a null et la methode isNull() vaudra alors true.

Parameters:
decimal - la valeur decimale a convertir (qui peut etre nulle).

toDecimal

public Float toDecimal()

getDegre

public Integer getDegre()

getMinute

public Integer getMinute()

getSeconde

public Integer getSeconde()

setDegre

public void setDegre(Integer degre)

setMinute

public void setMinute(Integer minute)

setSeconde

public void setSeconde(Integer seconde)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2010-2011 IRD. All Rights Reserved.