Class UnitOfMeasurement
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.units.UnitOfMeasurement
- All Implemented Interfaces:
Serializable
public class UnitOfMeasurement extends ExperimentObject
The unit to use for a measure.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description UnitOfMeasurement()
Empty default constructorUnitOfMeasurement(StandardUnit standardUnit)
Constructor.UnitOfMeasurement(StandardUnit standardUnit, MetricsPrefix metricsPrefix)
Constructor.UnitOfMeasurement(String fullName, String abbreviation, MetricsPrefix metricsPrefix)
Constructor. -
Method Summary
Modifier and Type Method 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()
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
UnitOfMeasurement
public UnitOfMeasurement()Empty default constructor -
UnitOfMeasurement
Constructor.- Parameters:
fullName
- the full name of the unitabbreviation
- the abbreviated name of the unitmetricsPrefix
- the metrics prefix
-
UnitOfMeasurement
Constructor.- Parameters:
standardUnit
- a standard unitmetricsPrefix
- the metrics prefix
-
UnitOfMeasurement
Constructor.- Parameters:
standardUnit
- a standard unit
-
-
Method Details
-
getFullName
Returns the full name of the unit.- Returns:
- the full name of the unit
-
getAbbreviation
Returns the abbreviated name of the unit.- Returns:
- the abbreviated name of the unit
-
getMetricsPrefix
Returns the metrics prefix.- Returns:
- the metrics prefix
-
getDisplayName
Returns the name to display, e.g. fmol.- Returns:
- the name to display
-
toString
-
isSameAs
Indicates whether the given unit of measurement is the same as another.- Parameters:
unitOfMeasurement
- an other unit of measurement- Returns:
- a boolean indicating whether the given unit of measurement is the same as another
-