edu.nrao.sss.measure
Enum FluxDensityUnits

java.lang.Object
  extended by java.lang.Enum<FluxDensityUnits>
      extended by edu.nrao.sss.measure.FluxDensityUnits
All Implemented Interfaces:
Symbolic, Serializable, Comparable<FluxDensityUnits>

public enum FluxDensityUnits
extends Enum<FluxDensityUnits>
implements Symbolic

Units of measure for flux densities.

Table of Units

Element Name(s)1 Symbol(s)2 Cycles per
Second
YOCTOJANSKYYOCTOJANSKY yJy10-24
ZEPTOJANSKYZEPTOJANSKY zJy10-21
ATTOJANSKYATTOJANSKY aJy10-18
FEMTOJANSKYFEMTOJANSKY fJy10-15
PICOJANSKYPICOJANSKY pJy10-12
NANOJANSKYNANOJANSKY nJy10-9
MICROJANSKYMICROJANSKY µJy10-6
MILLIJANSKYMILLIJANSKY mJy0.001
CENTIJANSKYCENTIJANSKY cJy0.01
DECIJANSKYDECIJANSKY dJy0.1
JANSKYJANSKY Jy1.0
DECAJANSKYDECAJANSKY daJy10.0
HECTOJANSKYHECTOJANSKY hJy100.0
KILOJANSKYKILOJANSKY kJy1,000.0
MEGAJANSKYMEGAJANSKY MJy106
GIGAJANSKYGIGAJANSKY GJy109
TERAJANSKYTERAJANSKY TJy1012
PETAJANSKYPETAJANSKY PJy1015
ETAJANSKYETAJANSKY EJy1018
ZETTAJANSKYZETTAJANSKY ZJy1021
YOTTAJANSKYYOTTAJANSKY YJy1024
1The names in this column may be sent to fromString(String). Note that the names are not case sensitive.
2The symbols in this column may be sent to fromString(String). Note that the symbols are case sensitive.

Table of Conversion Factors3

yJyzJyaJyfJypJynJyµJymJycJydJyJydaJyhJykJyMJyGJyTJyPJyEJyZJyYJy
YOCTOJANSKY10.0010.0000011E-91E-121E-151E-181E-211E-221E-231E-241E-251E-261E-271E-301E-331E-361E-391E-421E-451E-48
ZEPTOJANSKY1E+310.0010.0000011E-91E-121E-151E-181E-191E-201E-211E-221E-231E-241E-271E-301E-331E-361E-391E-421E-45
ATTOJANSKY1E+61E+310.0010.0000011E-91E-121E-151E-161E-171E-181E-191E-201E-211E-241E-271E-301E-331E-361E-391E-42
FEMTOJANSKY1E+91E+61E+310.0010.0000011E-91E-121E-131E-141E-151E-161E-171E-181E-211E-241E-271E-301E-331E-361E-39
PICOJANSKY1E+121E+91E+61E+310.0010.0000011E-91E-101E-111E-121E-131E-141E-151E-181E-211E-241E-271E-301E-331E-36
NANOJANSKY1E+151E+121E+91E+61E+310.0010.0000011E-71E-81E-91E-101E-111E-121E-151E-181E-211E-241E-271E-301E-33
MICROJANSKY1E+181E+151E+121E+91E+61E+310.0010.00010.000010.0000011E-71E-81E-91E-121E-151E-181E-211E-241E-271E-30
MILLIJANSKY1E+211E+181E+151E+121E+91E+61E+310.10.010.0010.00010.000010.0000011E-91E-121E-151E-181E-211E-241E-27
CENTIJANSKY1E+221E+191E+161E+131E+101E+71E+41E+110.10.010.0010.00010.000011E-81E-111E-141E-171E-201E-231E-26
DECIJANSKY1E+231E+201E+171E+141E+111E+81E+51E+21E+110.10.010.0010.00011E-71E-101E-131E-161E-191E-221E-25
JANSKY1E+241E+211E+181E+151E+121E+91E+61E+31E+21E+110.10.010.0010.0000011E-91E-121E-151E-181E-211E-24
DECAJANSKY1E+251E+221E+191E+161E+131E+101E+71E+41E+31E+21E+110.10.010.000011E-81E-111E-141E-171E-201E-23
HECTOJANSKY1E+261E+231E+201E+171E+141E+111E+81E+51E+41E+31E+21E+110.10.00011E-71E-101E-131E-161E-191E-22
KILOJANSKY1E+271E+241E+211E+181E+151E+121E+91E+61E+51E+41E+31E+21E+110.0010.0000011E-91E-121E-151E-181E-21
MEGAJANSKY1E+301E+271E+241E+211E+181E+151E+121E+91E+81E+71E+61E+51E+41E+310.0010.0000011E-91E-121E-151E-18
GIGAJANSKY1E+331E+301E+271E+241E+211E+181E+151E+121E+111E+101E+91E+81E+71E+61E+310.0010.0000011E-91E-121E-15
TERAJANSKY1E+361E+331E+301E+271E+241E+211E+181E+151E+141E+131E+121E+111E+101E+91E+61E+310.0010.0000011E-91E-12
PETAJANSKY1E+391E+361E+331E+301E+271E+241E+211E+181E+171E+161E+151E+141E+131E+121E+91E+61E+310.0010.0000011E-9
ETAJANSKY1E+421E+391E+361E+331E+301E+271E+241E+211E+201E+191E+181E+171E+161E+151E+121E+91E+61E+310.0010.000001
ZETTAJANSKY1E+451E+421E+391E+361E+331E+301E+271E+241E+231E+221E+211E+201E+191E+181E+151E+121E+91E+61E+310.001
YOTTAJANSKY1E+481E+451E+421E+391E+361E+331E+301E+271E+261E+251E+241E+231E+221E+211E+181E+151E+121E+91E+61E+31
3This table was generated from the conversion logic of this class. Note the few cells were conversion is not perfect, even though we are using the BigDecimal class. (Prior to use BigDecimal even more cells were off.)

Version Info:

$Revision: 1586 $
$Date: 2008-10-01 10:38:49 -0600 (Wed, 01 Oct 2008) $
$Author: dharland $

Since:
2006-05-16
Author:
David M. Harland

Enum Constant Summary
ATTOJANSKY
          10-18 janskies.
CENTIJANSKY
          0.01 janskies.
DECAJANSKY
          10 janskies.
DECIJANSKY
          0.1 janskies.
ETAJANSKY
          1018 janskies.
FEMTOJANSKY
          10-15 janskies.
GIGAJANSKY
          109 janskies.
HECTOJANSKY
          100 janskies.
JANSKY
          A unit of flux equal to 10-26 watts per square-meter per hertz.
KILOJANSKY
          1,000 janskies.
MEGAJANSKY
          106 janskies.
MICROJANSKY
          10-6 janskies.
MILLIJANSKY
          0.001 janskies.
NANOJANSKY
          10-9 janskies.
PETAJANSKY
          1015 janskies.
PICOJANSKY
          10-12 janskies.
TERAJANSKY
          1012 janskies.
YOCTOJANSKY
          10-24 janskies.
YOTTAJANSKY
          1024 janskies.
ZEPTOJANSKY
          10-21 janskies.
ZETTAJANSKY
          1021 janskies.
 
Method Summary
static FluxDensityUnits fromString(String text)
          Returns the flux density units represented by text.
static FluxDensityUnits getDefault()
          Returns a default unit of flux density.
static FluxDensityUnits getForMultipleOfThreePower(int powerOfTen)
          Similar to getForPower(int), but the returned units will have a power that is evenly divisible by three.
static FluxDensityUnits getForPower(int powerOfTen)
          Returns the units that corresponds to 1.0 * 10powerOfTen Hz.
static FluxDensityUnits getLargest()
          Returns the element that represents the largest number of Janskies.
static FluxDensityUnits getSmallest()
          Returns the element that represents the smallest number of Janskies.
 String getSymbol()
          Returns the symbol for this unit.
 boolean symbolsAreCaseSensitive()
          Returns true -- these symbols are case sensitive.
 BigDecimal toJanskies()
          Returns the number of janskies for this unit.
 String toString()
          Returns a text representation of this enumeration constant.
 BigDecimal toUnits(FluxDensityUnits otherUnits)
          Returns a factor for converting from this unit to otherUnits.
static FluxDensityUnits valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FluxDensityUnits[] 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

YOCTOJANSKY

public static final FluxDensityUnits YOCTOJANSKY
10-24 janskies.


ZEPTOJANSKY

public static final FluxDensityUnits ZEPTOJANSKY
10-21 janskies.


ATTOJANSKY

public static final FluxDensityUnits ATTOJANSKY
10-18 janskies.


FEMTOJANSKY

public static final FluxDensityUnits FEMTOJANSKY
10-15 janskies.


PICOJANSKY

public static final FluxDensityUnits PICOJANSKY
10-12 janskies.


NANOJANSKY

public static final FluxDensityUnits NANOJANSKY
10-9 janskies.


MICROJANSKY

public static final FluxDensityUnits MICROJANSKY
10-6 janskies.


MILLIJANSKY

public static final FluxDensityUnits MILLIJANSKY
0.001 janskies.


CENTIJANSKY

public static final FluxDensityUnits CENTIJANSKY
0.01 janskies.


DECIJANSKY

public static final FluxDensityUnits DECIJANSKY
0.1 janskies.


JANSKY

public static final FluxDensityUnits JANSKY
A unit of flux equal to 10-26 watts per square-meter per hertz. References: UNC and Wikipedia.


DECAJANSKY

public static final FluxDensityUnits DECAJANSKY
10 janskies.


HECTOJANSKY

public static final FluxDensityUnits HECTOJANSKY
100 janskies.


KILOJANSKY

public static final FluxDensityUnits KILOJANSKY
1,000 janskies.


MEGAJANSKY

public static final FluxDensityUnits MEGAJANSKY
106 janskies.


GIGAJANSKY

public static final FluxDensityUnits GIGAJANSKY
109 janskies.


TERAJANSKY

public static final FluxDensityUnits TERAJANSKY
1012 janskies.


PETAJANSKY

public static final FluxDensityUnits PETAJANSKY
1015 janskies.


ETAJANSKY

public static final FluxDensityUnits ETAJANSKY
1018 janskies.


ZETTAJANSKY

public static final FluxDensityUnits ZETTAJANSKY
1021 janskies.


YOTTAJANSKY

public static final FluxDensityUnits YOTTAJANSKY
1024 janskies.

Method Detail

values

public static FluxDensityUnits[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FluxDensityUnits c : FluxDensityUnits.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FluxDensityUnits valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

symbolsAreCaseSensitive

public boolean symbolsAreCaseSensitive()
Returns true -- these symbols are case sensitive.

Specified by:
symbolsAreCaseSensitive in interface Symbolic
Returns:
true if the case of the symbols carry meaning.

getSymbol

public String getSymbol()
Returns the symbol for this unit. For example, the symbol for jansky is Jy.

Specified by:
getSymbol in interface Symbolic
Returns:
the symbol for this unit.

toJanskies

public BigDecimal toJanskies()
Returns the number of janskies for this unit.

Returns:
the number of janskies in this unit.

toUnits

public BigDecimal toUnits(FluxDensityUnits otherUnits)
Returns a factor for converting from this unit to otherUnits.

Parameters:
otherUnits - the unit to which conversion is desired.
Returns:
a factor for converting from this unit to otherUnits.

getDefault

public static FluxDensityUnits getDefault()
Returns a default unit of flux density.

Returns:
a default unit of flux density.

getLargest

public static FluxDensityUnits getLargest()
Returns the element that represents the largest number of Janskies.

Returns:
the element that represents the largest number of Janskies.

getSmallest

public static FluxDensityUnits getSmallest()
Returns the element that represents the smallest number of Janskies.

Returns:
the element that represents the smallest number of Janskies.

getForPower

public static FluxDensityUnits getForPower(int powerOfTen)
Returns the units that corresponds to 1.0 * 10powerOfTen Hz.

If there is no units with the exact powerOfTen Jy, the largest units whose power is less than powerOfTen will be returned. If powerOfTen is less than that of the smallest units, the smallest units will be returned.

Returns:
the units that corresponds to 1.0 * 10powerOfTen Jy.

getForMultipleOfThreePower

public static FluxDensityUnits getForMultipleOfThreePower(int powerOfTen)
Similar to getForPower(int), but the returned units will have a power that is evenly divisible by three.


toString

public String toString()
Returns a text representation of this enumeration constant.

Overrides:
toString in class Enum<FluxDensityUnits>
Returns:
a text representation of this enumeration constant.

fromString

public static FluxDensityUnits fromString(String text)
Returns the flux density units represented by text.

Leading and trailing whitespace is first stripped from text. A case-insensitive comparison against the name and toString methods of each constant in the enumeration is then performed, while a case-sensitive comparison is done againt the getSymbol method. If no match is found, null is returned. The comparison of the symbol needs to be case-sensitive because of units such as millijansky (mJy) and megajansky (MJy).

Parameters:
text - a text representation of a unit of flux density.
Returns:
the flux density units represented by text.


Copyright © 2009. All Rights Reserved.