|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.IlvUnit
ilog.views.maps.IlvAngularUnit
public class IlvAngularUnit
This class defines angular units. Angular units are used to measure planar angles.
The kernel unit of IlvAngularUnit is the radian.
IlvAngularUnit has constants defining usual units:
RADIAN defines radians.
DEGREE defines degrees.
GRAD defines grads.
GetRegisteredUnit method, or listed using the
GetRegisteredUnits method of the superclass,
IlvUnit.
IlvUnit| Field Summary | |
|---|---|
static IlvAngularUnit |
DEGREE
The unit representing degrees. |
static IlvAngularUnit |
GRAD
The unit representing grads. |
static IlvAngularUnit |
RADIAN
The unit representing radians. |
| Constructor Summary | |
|---|---|
IlvAngularUnit(double radiansPerUnit,
String abbreviation,
String name)
Constructs a new angular unit. |
|
IlvAngularUnit(IlvAngularUnit source)
Constructs a new angular unit by copying an existing one. |
|
IlvAngularUnit(IlvInputStream stream)
Reads the object from an IlvInputStream object. |
|
| Method Summary | |
|---|---|
IlvUnit |
copy()
Returns a copy of this IlvAngularUnit. |
boolean |
equivalent(IlvUnit unit)
Returns true if the specified unit is equivalent to this
one. |
double |
fromDMS(String value)
Converts a string specifying an angle in degrees, minutes, and seconds to this angular unit. |
double |
fromKernel(double value)
Converts the value specified in the kernel unit of the quantity measured by this unit, to values in this unit. |
double |
fromRadians(double radians)
Converts radians to this unit. |
double |
getRadiansPerUnit()
Returns the number of radians per unit. |
String |
toDMS(double angle,
boolean lat)
Converts a double representing an angle expressed in this unit to its DMS (Degree, Minute, Second) representation. |
double |
toKernel(double value)
Converts the value specified in the units of this IlvUnit to
the kernel unit (that is, radians). |
double |
toRadians(double unit)
Converts this unit to radians. |
void |
write(IlvOutputStream stream)
Writes the object to the specified IlvOutputStream. |
| Methods inherited from class ilog.views.maps.IlvUnit |
|---|
equals, getAbbreviation, getName, GetRegisteredUnit, GetRegisteredUnits, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IlvAngularUnit RADIAN
public static final IlvAngularUnit DEGREE
public static final IlvAngularUnit GRAD
| Constructor Detail |
|---|
public IlvAngularUnit(double radiansPerUnit,
String abbreviation,
String name)
name - The name of the unit.abbreviation - The abbreviation of the unit.radiansPerUnit - The number of radians per unit.public IlvAngularUnit(IlvAngularUnit source)
source - The source unit.
public IlvAngularUnit(IlvInputStream stream)
throws IlvReadFileException
IlvInputStream object.
stream - The input stream.
IlvReadFileException - If the format is not correct.| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectwrite in class IlvUnitstream - The stream to write this unit to.
IOException - If an I/O error occurs.public double getRadiansPerUnit()
public double fromRadians(double radians)
radians - The value to convert, expressed in radians.
public double toRadians(double unit)
unit - The value to convert, expressed in this unit.
public double toKernel(double value)
IlvUnit to
the kernel unit (that is, radians).
toKernel in class IlvUnitvalue - The value to convert.
public double fromKernel(double value)
fromKernel in class IlvUnitvalue - The value expressed in kernel units.
public IlvUnit copy()
IlvAngularUnit.
public boolean equivalent(IlvUnit unit)
true if the specified unit is equivalent to this
one.
equivalent in class IlvUnitunit - The unit to compare to.
true if the two units are equivalent.
public String toDMS(double angle,
boolean lat)
lat parameter (N or S
if lat is true, E or W otherwise).
angle - The value to be converted.lat - true, if the angle is a latitude, and false if the
angle is a longitude.public double fromDMS(String value)
value - The string defining the angle in DMS.
value is
null, or the empty string.
IllegalArgumentException - If a string format error occurs.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||