1.0.0

org.eclipse.soda.dk.units.service
Interface UnitsService

All Known Implementing Classes:
Units

public interface UnitsService

The UnitsService interface defines the UnitsService concept. UnitsService provides a way for representation of the unit type which accompanies data. For example, a piece of data may return the value of 5. The specification may state that this value is in centimeters. A UnitsService implementation for centimeters would be used to store the data, so that it could later be converted and displayed appropriately. In this manner, a app programmer does not need to know what units the data was actually in, only ask for the units in the format he/she desires, assuming that the conversion is possible. i.e. inches to centimeters would be valid, whereas centimeters to kilograms would not be.

Version:
1.0.0
See Also:
Units

Method Summary
 java.lang.String getKey()
          Gets the String key property value.
 java.lang.String getValueText(java.lang.Object value)
          Perform the getValueText method and return the String result.
 

Method Detail

getKey

java.lang.String getKey()
Gets the String key property value. This method returns the String name of the type of unit. An example might be "Centimeters"

Returns:
Results of the get key (String) value.

getValueText

java.lang.String getValueText(java.lang.Object value)
Perform the getValueText method and return the String result. This method returns a String which contains the value parameter as a String appended to the type of units returned by the getKey method. An example might be "5 Centimeters"

Parameters:
value - java.lang.Object
Returns:
Results of the get value text (String) value.

1.0.0

Copyright (c) 1999, 2007 IBM