Package javax.measure
Interface Prefix
-
- All Known Implementing Classes:
BinaryPrefix,MetricPrefix
public interface Prefix
A unit prefix is a specifier or mnemonic that is prepended to units of measurement to indicate multiples or fractions of the units.- Since:
- 2.0
- Version:
- 1.4, April 3, 2023
- Author:
- Werner Keil
- See Also:
- Wikipedia: Unit Prefix
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetExponent()Exponent part of the associated factor inbase^exponentrepresentation.java.lang.StringgetName()Returns the name of this prefix.java.lang.StringgetSymbol()Returns the symbol of this prefix.java.lang.NumbergetValue()Returns the value of this prefix.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of this prefix.- Returns:
- this prefix name, not
null.
-
getSymbol
java.lang.String getSymbol()
Returns the symbol of this prefix.- Returns:
- this prefix symbol, not
null.
-
getValue
java.lang.Number getValue()
Returns the value of this prefix. If theexponentis different from1, this value is thebasepart of the associated factor inbase^exponentrepresentation.- Returns:
- The prefix value.
-
getExponent
int getExponent()
Exponent part of the associated factor inbase^exponentrepresentation. For different factors, e.g. rational numbers like1/4the exponent is always1.- Returns:
- the exponent part of this prefix.
-
-