- java.lang.Object
-
- java.lang.Enum<SpaceUnit>
-
- org.arakhne.afc.math.physics.SpaceUnit
-
- All Implemented Interfaces:
Serializable,Comparable<SpaceUnit>
public enum SpaceUnit extends Enum<SpaceUnit>
A SpaceUnit represents space distance at a given unit of granularity.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND
- See Also:
MeasureUnitUtil- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathphysics
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CENTIMETERcentimeter.DECAMETERdecameter.DECIMETERdecimeter.FEMTOMETERfemtometer.GIGAMETERgigameter.HECTOMETERhectometer.KILOMETERkilometer.MEGAMETERmegaeter.METERmeter.MICROMETERmicrometer.MILLIMETERmillimeter.NANOMETERnanometer.PICOMETERpicometer.TERAMETERterameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetSymbol()Replies the localized symbol for this space unit.SpaceUnitlower()Replies the space unit just lower than the current space unit, or the space unit itself if it is the smallest.SpaceUnitupper()Replies the space unit just upper than the current space unit, or the space unit itself if it is the uppest.static SpaceUnitvalueOf(String name)Returns the enum constant of this type with the specified name.static SpaceUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FEMTOMETER
public static final SpaceUnit FEMTOMETER
femtometer.
-
PICOMETER
public static final SpaceUnit PICOMETER
picometer.
-
NANOMETER
public static final SpaceUnit NANOMETER
nanometer.
-
MICROMETER
public static final SpaceUnit MICROMETER
micrometer.
-
MILLIMETER
public static final SpaceUnit MILLIMETER
millimeter.
-
CENTIMETER
public static final SpaceUnit CENTIMETER
centimeter.
-
DECIMETER
public static final SpaceUnit DECIMETER
decimeter.
-
METER
public static final SpaceUnit METER
meter.
-
DECAMETER
public static final SpaceUnit DECAMETER
decameter.
-
HECTOMETER
public static final SpaceUnit HECTOMETER
hectometer.
-
KILOMETER
public static final SpaceUnit KILOMETER
kilometer.
-
MEGAMETER
public static final SpaceUnit MEGAMETER
megaeter.
-
GIGAMETER
public static final SpaceUnit GIGAMETER
gigameter.
-
TERAMETER
public static final SpaceUnit TERAMETER
terameter.
-
-
Method Detail
-
values
public static SpaceUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SpaceUnit c : SpaceUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SpaceUnit valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
lower
@Pure public SpaceUnit lower()
Replies the space unit just lower than the current space unit, or the space unit itself if it is the smallest.- Returns:
- the space unit just lower than the current space unit, or the space unit itself if it is the smallest.
-
upper
@Pure public SpaceUnit upper()
Replies the space unit just upper than the current space unit, or the space unit itself if it is the uppest.- Returns:
- the space unit just upper than the current space unit, or the space unit itself if it is the uppest.
-
getSymbol
@Pure public String getSymbol()
Replies the localized symbol for this space unit.- Returns:
- the localized symbol for this space unit.
-
-