public class UnitsConverter extends Object
Instances of this class are immutable.
Modifier and Type | Field and Description |
---|---|
static UnitsConverter |
ARC_SECONDS_TO_RADIANS
Arcseconds to radians converter.
|
static UnitsConverter |
DAYS_TO_SECONDS
Days to seconds converter.
|
static UnitsConverter |
IDENTITY
Identity converter.
|
static UnitsConverter |
KILOMETRES_2_TO_METRES_2
Square kilometres to square metres converter.
|
static UnitsConverter |
KILOMETRES_TO_METRES
Kilometres to metres converter.
|
static UnitsConverter |
KM3_P_S2_TO_M3_P_S2
km³/s² to m³/s² converter.
|
static UnitsConverter |
MILLI_ARC_SECONDS_TO_RADIANS
Milli arcseconds to radians converter.
|
static UnitsConverter |
MILLI_SECONDS_TO_SECONDS
Milli seconds to seconds converter.
|
static UnitsConverter |
PERCENTS_TO_UNIT
Percents to units converter.
|
Constructor and Description |
---|
UnitsConverter(Unit from,
Unit to)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
convert(double value)
Convert a value.
|
Unit |
getFrom()
Get the source unit.
|
Unit |
getTo()
Get the destination unit.
|
String |
toString() |
public static final UnitsConverter IDENTITY
public static final UnitsConverter PERCENTS_TO_UNIT
public static final UnitsConverter ARC_SECONDS_TO_RADIANS
public static final UnitsConverter MILLI_ARC_SECONDS_TO_RADIANS
public static final UnitsConverter MILLI_SECONDS_TO_SECONDS
public static final UnitsConverter DAYS_TO_SECONDS
public static final UnitsConverter KILOMETRES_TO_METRES
public static final UnitsConverter KILOMETRES_2_TO_METRES_2
public static final UnitsConverter KM3_P_S2_TO_M3_P_S2
public Unit getFrom()
public Unit getTo()
public double convert(double value)
value
- value in the source unit
destination unit
Copyright © 2002-2022 CS GROUP. All rights reserved.