deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.units
Class Unit

java.lang.Object
  extended by org.deegree.model.csct.units.Unit
All Implemented Interfaces:
Serializable

public final class Unit
extends Object
implements Serializable

Placeholder for future Unit class. This skeleton will be removed when the real classes (from JSR-108: Units specification) will be publicly available.

IMPORTANT: future version will NOT be compatible will this one. Remind, this is a temporary class!

See Also:
Serialized Form

Field Summary
static Unit BRITISHYARD
          British yard; unit of length.
static Unit DAY
          Unit of time.
static Unit DEGREE
          Unit of angle.
static Unit METRE
          Base unit of length.
static Unit MILLISECOND
          Unit of time.
static Unit SECOND
          Base unit of time.
 
Method Summary
 boolean canConvert(Unit other)
          Check if amount of the specified unit can be converted into amount of this unit.
 double convert(double value, Unit unit)
          Convert a value from one unit to an other.
 boolean equals(Object object)
          Compare this unit symbol with the specified object for equality.
static Unit get(String symbol)
          Returns an unit instance.
 int hashCode()
          Returns a hash code value.
 String toString()
          Returns a string representation of this unit's symbol.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEGREE

public static final Unit DEGREE
Unit of angle.


METRE

public static final Unit METRE
Base unit of length.


BRITISHYARD

public static final Unit BRITISHYARD
British yard; unit of length.


SECOND

public static final Unit SECOND
Base unit of time.


MILLISECOND

public static final Unit MILLISECOND
Unit of time.


DAY

public static final Unit DAY
Unit of time.

Method Detail

get

public static Unit get(String symbol)
Returns an unit instance.


canConvert

public boolean canConvert(Unit other)
Check if amount of the specified unit can be converted into amount of this unit.


convert

public double convert(double value,
                      Unit unit)
Convert a value from one unit to an other. This method is not implemented (the JSR-108 will provide the reference implementation).


toString

public String toString()
Returns a string representation of this unit's symbol.

Overrides:
toString in class Object

hashCode

public int hashCode()
Returns a hash code value.

Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Compare this unit symbol with the specified object for equality. Only symbols are compared; other parameters are ignored.

Overrides:
equals in class Object

deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net