|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<DistanceUnits> edu.nrao.sss.measure.DistanceUnits
public enum DistanceUnits
Units of distance or length.
Table of Units
Element | Name(s)1 | Symbol(s)1 | Meters |
---|---|---|---|
ANGSTROM | ANGSTROM | Å | 10-10 |
NANOMETER | NANOMETER | nm | 10-9 |
MICROMETER | MICROMETER | µm | 10-6 |
MILLIMETER | MILLIMETER | mm | 0.001 |
CENTIMETER | CENTIMETER | cm | 0.01 |
METER | METER | m | 1.0 |
KILOMETER | KILOMETER | km | 1,000.0 |
MILE | MILE | mi | 1,609.347219 |
ASTRONOMICAL_UNIT | ASTRONOMICAL_UNIT | au | 149,597,870,691.0 |
LIGHT_SECOND | LIGHT_SECOND | ls | 299,792,458.0 |
LIGHT_MINUTE | LIGHT_MINUTE | lm | 17,987,547,480.0 |
LIGHT_YEAR | LIGHT_YEAR | ly | 9.4607304725808 x 1015 |
PARSEC | PARSEC | pc | 3.085677581306 x 1016 |
KILOPARSEC | KILOPARSEC | kpc | 3.085677581306 x 1019 |
MEGAPARSEC | MEGAPARSEC | Mpc | 3.085677581306 x 1022 |
fromString(String)
. Note that the names are
not case sensitive.Table of Conversion Factors2
Å | nm | µm | mm | cm | m | km | mi | ls | lm | au | ly | pc | kpc | Mpc | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ANGSTROM | 1 | 0.1 | 0.0001 | 1E-7 | 1E-8 | 1E-10 | 1E-13 | 6.21371192237333969617434184363318221585938121371192237333969617434184363318221585938121E-14 | 3.335640951981520495755767144749185117925815198459729096987489925447023754013184681E-19 | 5.5594015866358674929262785745819751965430253307662151616458165424117062566886411E-21 | 6.684587122670598840976921669305499647220242800053317772259440721774490915237141E-22 | 1.05700083402461546370946052448512723335292138770366856065971110776707473129E-26 | 3.2407792896390497959062206902856246498984427942833332932554692635801427905E-27 | 3.2407792896390497959062206902856246498984427942833332932554692635801428E-30 | 3.2407792896390497959062206902856246498984427942833332932554692635801E-33 |
NANOMETER | 1E+1 | 1 | 0.001 | 0.000001 | 1E-7 | 1E-9 | 1E-12 | 6.213711922373339696174341843633182215859381213711922373339696174341843633182215859381214E-13 | 3.3356409519815204957557671447491851179258151984597290969874899254470237540131846813E-18 | 5.55940158663586749292627857458197519654302533076621516164581654241170625668864114E-20 | 6.6845871226705988409769216693054996472202428000533177722594407217744909152371406E-21 | 1.057000834024615463709460524485127233352921387703668560659711107767074731289E-25 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047E-26 | 3.24077928963904979590622069028562464989844279428333329325546926358014279E-29 | 3.24077928963904979590622069028562464989844279428333329325546926358014E-32 |
MICROMETER | 1E+4 | 1E+3 | 1 | 0.001 | 0.0001 | 0.000001 | 1E-9 | 6.213711922373339696174341843633182215859381213711922373339696174341843633182215859381213712E-10 | 3.3356409519815204957557671447491851179258151984597290969874899254470237540131846812504E-15 | 5.55940158663586749292627857458197519654302533076621516164581654241170625668864113542E-17 | 6.6845871226705988409769216693054996472202428000533177722594407217744909152371405928E-18 | 1.057000834024615463709460524485127233352921387703668560659711107767074731289193E-22 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402E-23 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047E-26 | 3.24077928963904979590622069028562464989844279428333329325546926358014279E-29 |
MILLIMETER | 1E+7 | 1E+6 | 1E+3 | 1 | 0.1 | 0.001 | 0.000001 | 6.213711922373339696174341843633182215859381213711922373339696174341843633182215859381213711922E-7 | 3.3356409519815204957557671447491851179258151984597290969874899254470237540131846812503869E-12 | 5.55940158663586749292627857458197519654302533076621516164581654241170625668864113541731E-14 | 6.6845871226705988409769216693054996472202428000533177722594407217744909152371405927847E-15 | 1.05700083402461546370946052448512723335292138770366856065971110776707473128919331E-19 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402403E-20 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402E-23 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047E-26 |
CENTIMETER | 1E+8 | 1E+7 | 1E+4 | 1E+1 | 1 | 0.01 | 0.00001 | 0.0000062137119223733396961743418436331822158593812137119223733396961743418436331822158593812137119224 | 3.33564095198152049575576714474918511792581519845972909698748992544702375401318468125038689E-11 | 5.559401586635867492926278574581975196543025330766215161645816542411706256688641135417311E-13 | 6.68458712267059884097692166930549964722024280005331777225944072177449091523714059278475E-14 | 1.0570008340246154637094605244851272333529213877036685606597111077670747312891933104E-18 | 3.240779289639049795906220690285624649898442794283333293255469263580142790474024028E-19 | 3.240779289639049795906220690285624649898442794283333293255469263580142790474024E-22 | 3.240779289639049795906220690285624649898442794283333293255469263580142790474E-25 |
METER | 1E+10 | 1E+9 | 1E+6 | 1E+3 | 1E+2 | 1 | 0.001 | 0.0006213711922373339696174341843633182215859381213711922373339696174341843633182215859381213711922373 | 3.3356409519815204957557671447491851179258151984597290969874899254470237540131846812503868927E-9 | 5.55940158663586749292627857458197519654302533076621516164581654241170625668864113541731149E-11 | 6.6845871226705988409769216693054996472202428000533177722594407217744909152371405927847492E-12 | 1.057000834024615463709460524485127233352921387703668560659711107767074731289193310407E-16 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402402802E-17 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402403E-20 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402E-23 |
KILOMETER | 1E+13 | 1E+12 | 1E+9 | 1E+6 | 1E+5 | 1E+3 | 1 | 0.621371192237333969617434184363318221585938121371192237333969617434184363318221585938121371192237334 | 0.0000033356409519815204957557671447491851179258151984597290969874899254470237540131846812503868926549 | 5.55940158663586749292627857458197519654302533076621516164581654241170625668864113541731148776E-8 | 6.6845871226705988409769216693054996472202428000533177722594407217744909152371405927847492106E-9 | 1.057000834024615463709460524485127233352921387703668560659711107767074731289193310407124E-13 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402402801946E-14 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402402802E-17 | 3.24077928963904979590622069028562464989844279428333329325546926358014279047402403E-20 |
MILE | 1.609344E+13 | 1.609344E+12 | 1.609344E+9 | 1609344 | 160934.4 | 1609.344 | 1.609344 | 1 | 0.0000053681937522257481207215693197992325744232031347499742638622349865786149963785946876622226433728 | 8.94698958704291353453594886633205429070533855791662377310372497763102499396432447943703773895E-8 | 1.07578001783471922211331630269667900242560144288090066368790973689434463074914007901545794335E-8 | 1.701077950232510748828038038316992602233123917772572776086342113018295116351875518943843E-13 | 5.21552870510486695474290083058702831656615952032311673550092992652712131899262772534894E-14 | 5.21552870510486695474290083058702831656615952032311673550092992652712131899262772535E-17 | 5.21552870510486695474290083058702831656615952032311673550092992652712131899262773E-20 |
LIGHT_SECOND | 2.99792458E+18 | 2.99792458E+17 | 2.99792458E+14 | 2.99792458E+11 | 2.99792458E+10 | 299792458 | 299792.458 | 186282.3970512208701185079137835043346854370476417720512208701185079137835043346854370476417720512208701185 | 1 | 0.0166666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 | 0.0020039888042205663508684224685145588921582894563847866660007419476860687531776120312025170307509106 | 3.16880878140289502370268968489365477729611884300453773417496894567394225162876771364108804218E-8 | 9.7156118907638467109912423823118413585844361567058883641829195247214088714718664851101333699E-9 | 9.7156118907638467109912423823118413585844361567058883641829195247214088714718664851101334E-12 | 9.7156118907638467109912423823118413585844361567058883641829195247214088714718664851101E-15 |
LIGHT_MINUTE | 1.798754748E+20 | 1.798754748E+19 | 1.798754748E+16 | 1.798754748E+13 | 1.798754748E+12 | 1.798754748E+10 | 17987547.48 | 11176943.8230732522071104748270102600811262228585063230732522071104748270102600811262228585063230732522071105 | 6E+1 | 1 | 0.1202393282532339810521053481108735335294973673830871999600445168611641251906567218721510218450546382 | 0.0000019012852688417370142216138109361928663776713058027226405049813674043653509772606281846528253099 | 5.829367134458308026594745429387104815150661694023533018509751714832845322883119891066080021966E-7 | 5.829367134458308026594745429387104815150661694023533018509751714832845322883119891066080022E-10 | 5.82936713445830802659474542938710481515066169402353301850975171483284532288311989106608E-13 |
ASTRONOMICAL_UNIT | 1.49597870691E+21 | 1.49597870691E+20 | 1.49597870691E+17 | 1.49597870691E+14 | 1.49597870691E+13 | 149597870691 | 149597870.691 | 92955807.2674331901694106418515867334764972560248150799331901694106418515867334764972560248150799331901694106 | 499.0047838061356433456374676376948748990876881899410558220247155116890899236697942547974305611117141579 | 8.316746396768927389093957793961581248318128136499017597033745258528151498727829904246623842685195236 | 1 | 0.000015812507408869357725100687873529510320781291612478168676389355195315521139873431257598722037199 | 0.0000048481368110949340743208874398785763623166939142145880802088687332158719688464895313808141523382 | 4.8481368110949340743208874398785763623166939142145880802088687332158719688464895313808141523E-9 | 4.8481368110949340743208874398785763623166939142145880802088687332158719688464895313808142E-12 |
LIGHT_YEAR | 9.4607304725808E+25 | 9.4607304725808E+24 | 9.4607304725808E+21 | 9.4607304725808E+18 | 9.4607304725808E+17 | 9.4607304725808E+15 | 9460730472580.8 | 5878625373183.60773085182534001431639226914817465998568360773085182534001431639226914817465998568360773085182534 | 3.15576E+7 | 5.2596E+5 | 63241.0770880709446741653288923950436951744353488085436909850140882978832852778094358765514496249374961633 | 1 | 0.3066013938039691689667772306040441648576642024588617426415389011933483326023605737905115448353459931 | 0.000306601393803969168966777230604044164857664202458861742641538901193348332602360573790511544835346 | 3.066013938039691689667772306040441648576642024588617426415389011933483326023605737905115448353E-7 |
PARSEC | 3.085677581306E+26 | 3.085677581306E+25 | 3.085677581306E+22 | 3.085677581306E+19 | 3.085677581306E+18 | 3.085677581306E+16 | 3.085677581306E+13 | 19173511575561.2224608287600413584665553169490177364193112224608287600413584665553169490177364193112224608287600414 | 102927125.0481558145135192160171020713269577982512155125663634940409341451811973201807498439470415229725358868 | 1715452.0841359302418919869336183678554492966375202585427727249006822357530199553363458307324506920495422648 | 206264.8062471144735098427457870801413223839506955058255134613518908939401569841024576351601916130510922073 | 3.2615637769715001937257337699033535923821139202986130937195317147354090672673878932729308929399422951 | 1 | 0.001 | 0.000001 |
KILOPARSEC | 3.085677581306E+29 | 3.085677581306E+28 | 3.085677581306E+25 | 3.085677581306E+22 | 3.085677581306E+21 | 3.085677581306E+19 | 3.085677581306E+16 | 19173511575561222.4608287600413584665553169490177364193112224608287600413584665553169490177364193112224608287600413585 | 102927125048.1558145135192160171020713269577982512155125663634940409341451811973201807498439470415229725358868101 | 1715452084.1359302418919869336183678554492966375202585427727249006822357530199553363458307324506920495422647802 | 206264806.2471144735098427457870801413223839506955058255134613518908939401569841024576351601916130510922072734 | 3261.5637769715001937257337699033535923821139202986130937195317147354090672673878932729308929399422951218 | 1E+3 | 1 | 0.001 |
MEGAPARSEC | 3.085677581306E+32 | 3.085677581306E+31 | 3.085677581306E+28 | 3.085677581306E+25 | 3.085677581306E+24 | 3.085677581306E+22 | 3.085677581306E+19 | 19173511575561222460.8287600413584665553169490177364193112224608287600413584665553169490177364193112224608287600413584666 | 102927125048155.8145135192160171020713269577982512155125663634940409341451811973201807498439470415229725358868100678 | 1715452084135.9302418919869336183678554492966375202585427727249006822357530199553363458307324506920495422647801678 | 206264806247.1144735098427457870801413223839506955058255134613518908939401569841024576351601916130510922072733742 | 3261563.7769715001937257337699033535923821139202986130937195317147354090672673878932729308929399422951218054 | 1E+6 | 1E+3 | 1 |
Version Info:
$Revision: 1586 $ |
$Date: 2008-10-01 10:38:49 -0600 (Wed, 01 Oct 2008) $ |
$Author: dharland $ |
Enum Constant Summary | |
---|---|
ANGSTROM
|
|
ASTRONOMICAL_UNIT
|
|
CENTIMETER
|
|
KILOMETER
|
|
KILOPARSEC
|
|
LIGHT_MINUTE
|
|
LIGHT_SECOND
|
|
LIGHT_YEAR
|
|
MEGAPARSEC
|
|
METER
|
|
MICROMETER
|
|
MILE
|
|
MILLIMETER
|
|
NANOMETER
|
|
PARSEC
|
Method Summary | |
---|---|
static DistanceUnits |
fromString(String text)
Returns the distance units represented by text . |
static DistanceUnits |
getDefault()
Returns a unit of distance. |
String |
getSymbol()
Returns the symbol for this unit. |
boolean |
symbolsAreCaseSensitive()
Returns false -- these symbols are not case sensitive. |
BigDecimal |
toMeters()
Returns the number of meters in one of these units. |
String |
toString()
Returns a text representation of this enumeration constant. |
BigDecimal |
toUnits(DistanceUnits otherUnits)
Returns a factor for converting from this unit to otherUnits . |
static DistanceUnits |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DistanceUnits[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final DistanceUnits METER
public static final DistanceUnits KILOMETER
public static final DistanceUnits CENTIMETER
public static final DistanceUnits MILLIMETER
public static final DistanceUnits MICROMETER
public static final DistanceUnits NANOMETER
public static final DistanceUnits ANGSTROM
public static final DistanceUnits ASTRONOMICAL_UNIT
public static final DistanceUnits LIGHT_YEAR
public static final DistanceUnits LIGHT_MINUTE
public static final DistanceUnits LIGHT_SECOND
public static final DistanceUnits PARSEC
public static final DistanceUnits KILOPARSEC
public static final DistanceUnits MEGAPARSEC
public static final DistanceUnits MILE
Method Detail |
---|
public static 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 name
NullPointerException
- if the argument is nullpublic boolean symbolsAreCaseSensitive()
symbolsAreCaseSensitive
in interface Symbolic
public String getSymbol()
KILOMETER
is km.
getSymbol
in interface Symbolic
public BigDecimal toMeters()
public BigDecimal toUnits(DistanceUnits otherUnits)
otherUnits
.
otherUnits
- the unit to which conversion is desired.
otherUnits
.public static DistanceUnits getDefault()
public String toString()
toString
in class Enum<DistanceUnits>
public static DistanceUnits fromString(String text)
text
.
For details about the transformation, see
EnumerationUtility.enumFromString(Class, String)
.
text
- a text representation of a unit of distance.
text
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |