|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<DistanceUnits>
org.apache.lucene.spatial.geometry.DistanceUnits
@Deprecated public enum DistanceUnits
Enum representing difference distance units, currently only kilometers and miles
| Enum Constant Summary | |
|---|---|
KILOMETERS
Deprecated. |
|
MILES
Deprecated. |
|
| Method Summary | |
|---|---|
double |
convert(double distance,
DistanceUnits from)
Deprecated. Converts the given distance in given DistanceUnit, to a distance in the unit represented by this |
double |
earthCircumference()
Deprecated. Returns the circumference of the Earth |
double |
earthRadius()
Deprecated. Returns the average earth radius |
static DistanceUnits |
findDistanceUnit(String unit)
Deprecated. Returns the DistanceUnit which represents the given unit |
String |
getUnit()
Deprecated. Returns the string representation of the distance unit |
static DistanceUnits |
valueOf(String name)
Deprecated. Returns the enum constant of this type with the specified name. |
static DistanceUnits[] |
values()
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final DistanceUnits MILES
public static final DistanceUnits KILOMETERS
| Method Detail |
|---|
public static final DistanceUnits[] values()
for(DistanceUnits c : DistanceUnits.values())
System.out.println(c);
public static DistanceUnits valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified namepublic static DistanceUnits findDistanceUnit(String unit)
unit - Unit whose DistanceUnit should be found
IllegalArgumentException - if no DistanceUnit which represents the given unit is found
public double convert(double distance,
DistanceUnits from)
this
distance - Distance to convertfrom - Unit to convert the distance from
public String getUnit()
public double earthRadius()
public double earthCircumference()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||