|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<SIBaseUnit>
com.antelmann.math.SIBaseUnit
public enum SIBaseUnit
represents a standard SI base unit.
SIBaseUnitType| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.antelmann.util.Localizable |
|---|
Localizable.Adapter |
| Enum Constant Summary | |
|---|---|
AMPERE
|
|
CANDELA
|
|
KELVIN
|
|
KILOGRAM
|
|
METER
|
|
MOLE
|
|
SECOND
|
|
| Method Summary | |
|---|---|
static SIBaseUnit |
fromType(SIBaseUnitType type)
|
Locale |
getLocale()
allows access to the Locale that this instance currently uses to localize its messages, |
SIBaseUnitType |
getType()
|
String |
getUnitName()
provides the fully spelled name for this unit |
String |
getUnitSymbol()
provides a short symbolic representation of this unit |
void |
setLocale(Locale locale,
Object context)
sets the Locale for this object so that all subsequent return values of method calls to this instance can be localized accordingly until a different Locale is set. |
String |
toString()
|
DefaultUnit |
unwrap()
returns the embedded instance that this wrapper encloses |
static SIBaseUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SIBaseUnit[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final SIBaseUnit METER
public static final SIBaseUnit KILOGRAM
public static final SIBaseUnit SECOND
public static final SIBaseUnit AMPERE
public static final SIBaseUnit KELVIN
public static final SIBaseUnit MOLE
public static final SIBaseUnit CANDELA
| Method Detail |
|---|
public static SIBaseUnit[] values()
for (SIBaseUnit c : SIBaseUnit.values()) System.out.println(c);
public static SIBaseUnit valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic DefaultUnit unwrap()
Wrapped
unwrap in interface Wrapped<DefaultUnit>public Locale getLocale()
Localizable
getLocale in interface LocalizableLocalizable.setLocale(Locale, Object)
public void setLocale(Locale locale,
Object context)
Localizable
setLocale in interface Localizablelocale - the Locale that is to be used to determine return values for all methods
of this instance; if set to null, the default locale is to be used.context - a context that may be required for this instance to load the resources for the given locale;
this context may be null for objects that do not require an external context.
Examples of a context may be a database, a resource file, some map or no context at all.Localizable.getLocale()public String getUnitSymbol()
Unit
getUnitSymbol in interface Unitpublic String getUnitName()
Unit
getUnitName in interface Unitpublic String toString()
toString in class Enum<SIBaseUnit>public final SIBaseUnitType getType()
public static SIBaseUnit fromType(SIBaseUnitType type)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||