public class UnitOfMeasurement extends Object implements Serializable
Constructor and Description |
---|
UnitOfMeasurement(StandardUnit standardUnit)
Constructor.
|
UnitOfMeasurement(StandardUnit standardUnit,
MetricsPrefix metricsPrefix)
Constructor.
|
UnitOfMeasurement(String fullName,
String abbreviation,
MetricsPrefix metricsPrefix)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAbbreviation()
Returns the abbreviated name of the unit.
|
String |
getDisplayName()
Returns the name to display, e.g.
|
String |
getFullName()
Returns the full name of the unit.
|
MetricsPrefix |
getMetricsPrefix()
Returns the metrics prefix.
|
boolean |
isSameAs(UnitOfMeasurement unitOfMeasurement)
Indicates whether the given unit of measurement is the same as another.
|
String |
toString() |
public UnitOfMeasurement(String fullName, String abbreviation, MetricsPrefix metricsPrefix)
fullName
- the full name of the unitabbreviation
- the abbreviated name of the unitmetricsPrefix
- the metrics prefixpublic UnitOfMeasurement(StandardUnit standardUnit, MetricsPrefix metricsPrefix)
standardUnit
- a standard unitmetricsPrefix
- the metrics prefixpublic UnitOfMeasurement(StandardUnit standardUnit)
standardUnit
- a standard unitpublic String getFullName()
public String getAbbreviation()
public MetricsPrefix getMetricsPrefix()
public String getDisplayName()
public boolean isSameAs(UnitOfMeasurement unitOfMeasurement)
unitOfMeasurement
- an other unit of measurementCopyright © 2016. All rights reserved.