?? elevation.java
字號(hào):
package com.esri.solutions.jitk.services.elevation;
/**
* Contains the results from an Elevation Calculator operation.
* The elevation value will be in FEET or METERS. The Unit property
* will indicate which type it is in. Refer to the Constant Values
* for {@link #ELEVATION_UNIT_FEET} and {@link #ELEVATION_UNIT_METERS}
* for valid values of the Unit property.
*/
public class Elevation implements java.io.Serializable {
/**
* Indicates that the elevation value is in Feet.
*/
public static final int ELEVATION_UNIT_FEET = 1;
/**
* Indicates that the elevation value is in Meters.
*/
public static final int ELEVATION_UNIT_METERS = 2;
/**
* Serialization ID.
*/
private static final long serialVersionUID = -5906290760342709578L;
/**
* Elevation value.
*/
private double m_elevation;
/**
* Elevation Unit. Refer to ELEVATION_UNIT constants.
*/
private int m_unit;
/**
* Returns the elevation value. The elevation will be in the Units
* specified by calling {@link #getUnit()}.
*
* @return Elevation value.
*/
public double getElevation () {
return m_elevation;
}
/**
* Returns the Unit that the Elevation value is in. Values can be
* determined by looking at the ELEVATION_UNIT constants.
*
* @return Unit of Measure
*
* @see #ELEVATION_UNIT_FEET
* @see #ELEVATION_UNIT_METERS
*/
public int getUnit () {
return m_unit;
}
/**
* Create an Elevation object where the elevation value is
* in FEET measurement.
*
* @param value Elevation value.
* @return Elevation object where the elevation value is in
* FEET measurement.
*/
public static Elevation elevationAsFeet (double value) {
Elevation elevation = new Elevation();
elevation.m_elevation = value;
elevation.m_unit = ELEVATION_UNIT_FEET;
return elevation;
}
/**
* Create an Elevation object where the elevation value is
* in METERS measurement.
*
* @param value Elevation value.
* @return Elevation object where the elevation value is in
* METERS measurement.
*/
public static Elevation elevationAsMeters (double value) {
Elevation elevation = new Elevation ();
elevation.m_elevation = value;
elevation.m_unit = ELEVATION_UNIT_METERS;
return elevation;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -