public class CoordinateFormatter
extends java.lang.Object
| Constructor and Description |
|---|
CoordinateFormatter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
decimal(double value,
int precision)
Format a number with a specified precision.
|
java.lang.String |
format(double value,
int precision)
Render a value using the current rules.
|
static void |
main(java.lang.String[] args) |
void |
setSeparators(java.lang.String[] separators)
Specify the two separators to be used between
the three numbers in sexagesimal output.
|
void |
setSexagesimal(boolean flag) |
void |
setZeroFill(boolean flag) |
java.lang.String |
sexagesimal(double value,
int precision)
Create a sexagesimal string representing the coordinate value.
|
public java.lang.String sexagesimal(double value,
int precision)
value - A double precision value which is to be
converted to a string representation. The user should convert
to hours prior to this call if the string is to be in hours.precision - A integer value giving the precision to which
the value is to be shown.
public java.lang.String decimal(double value,
int precision)
public void setZeroFill(boolean flag)
public void setSexagesimal(boolean flag)
public void setSeparators(java.lang.String[] separators)
separators - public java.lang.String format(double value,
int precision)
public static void main(java.lang.String[] args)