edu.nrao.sss.measure
Enum FrequencyUnits

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

public enum FrequencyUnits
extends Enum<FrequencyUnits>
implements Symbolic

Units of measure for frequencies.

Table of Units

Element Name(s)1 Symbol(s)2 Cycles per
Second
YOCTOHERTZYOCTOHERTZ yHz10-24
ZEPTOHERTZZEPTOHERTZ zHz10-21
ATTOHERTZATTOHERTZ aHz10-18
FEMTOHERTZFEMTOHERTZ fHz10-15
PICOHERTZPICOHERTZ pHz10-12
NANOHERTZNANOHERTZ nHz10-9
MICROHERTZMICROHERTZ µHz10-6
MILLIHERTZMILLIHERTZ mHz0.001
CENTIHERTZCENTIHERTZ cHz0.01
DECIHERTZDECIHERTZ dHz0.1
HERTZHERTZ Hz1.0
DECAHERTZDECAHERTZ daHz10.0
HECTOHERTZHECTOHERTZ hHz100.0
KILOHERTZKILOHERTZ kHz1,000.0
MEGAHERTZMEGAHERTZ MHz106
GIGAHERTZGIGAHERTZ GHz109
TERAHERTZTERAHERTZ THz1012
PETAHERTZPETAHERTZ PHz1015
ETAHERTZETAHERTZ EHz1018
ZETTAHERTZZETTAHERTZ ZHz1021
YOTTAHERTZYOTTAHERTZ YHz1024
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

yHzzHzaHzfHzpHznHzµHzmHzcHzdHzHzdaHzhHzkHzMHzGHzTHzPHzEHzZHzYHz
YOCTOHERTZ1.00.00100.00000101.0E-91.0E-121.0E-151.0E-181.0E-211.0E-221.0E-231.0E-241.0E-251.0E-261.0E-271.0E-301.0E-331.0E-361.0E-391.0E-421.0E-451.0E-48
ZEPTOHERTZ1.0E+31.00.00100.00000101.0E-91.0E-121.0E-151.0E-181.0E-191.0E-201.0E-211.0E-221.0E-231.0E-241.0E-271.0E-301.0E-331.0E-361.0E-391.0E-421.0E-45
ATTOHERTZ1.0E+61.0E+31.00.00100.00000101.0E-91.0E-121.0E-151.0E-161.0E-171.0E-181.0E-191.0E-201.0E-211.0E-241.0E-271.0E-301.0E-331.0E-361.0E-391.0E-42
FEMTOHERTZ1.0E+91.0E+61.0E+31.00.00100.00000101.0E-91.0E-121.0E-131.0E-141.0E-151.0E-161.0E-171.0E-181.0E-211.0E-241.0E-271.0E-301.0E-331.0E-361.0E-39
PICOHERTZ1.0E+121.0E+91.0E+61.0E+31.00.00100.00000101.0E-91.0E-101.0E-111.0E-121.0E-131.0E-141.0E-151.0E-181.0E-211.0E-241.0E-271.0E-301.0E-331.0E-36
NANOHERTZ1.0E+151.0E+121.0E+91.0E+61.0E+31.00.00100.00000101.0E-71.0E-81.0E-91.0E-101.0E-111.0E-121.0E-151.0E-181.0E-211.0E-241.0E-271.0E-301.0E-33
MICROHERTZ1.0E+181.0E+151.0E+121.0E+91.0E+61.0E+31.00.00100.000100.0000100.00000101.0E-71.0E-81.0E-91.0E-121.0E-151.0E-181.0E-211.0E-241.0E-271.0E-30
MILLIHERTZ1.0E+211.0E+181.0E+151.0E+121.0E+91.0E+61.0E+31.00.100.0100.00100.000100.0000100.00000101.0E-91.0E-121.0E-151.0E-181.0E-211.0E-241.0E-27
CENTIHERTZ1.0E+221.0E+191.0E+161.0E+131.0E+101.0E+71.0E+4101.00.100.0100.00100.000100.0000101.0E-81.0E-111.0E-141.0E-171.0E-201.0E-231.0E-26
DECIHERTZ1.0E+231.0E+201.0E+171.0E+141.0E+111.0E+81.0E+51.0E+2101.00.100.0100.00100.000101.0E-71.0E-101.0E-131.0E-161.0E-191.0E-221.0E-25
HERTZ1.0E+241.0E+211.0E+181.0E+151.0E+121.0E+91.0E+61.0E+31.0E+2101.00.100.0100.00100.00000101.0E-91.0E-121.0E-151.0E-181.0E-211.0E-24
DECAHERTZ1.0E+251.0E+221.0E+191.0E+161.0E+131.0E+101.0E+71.0E+41.0E+31.0E+2101.00.100.0100.0000101.0E-81.0E-111.0E-141.0E-171.0E-201.0E-23
HECTOHERTZ1.0E+261.0E+231.0E+201.0E+171.0E+141.0E+111.0E+81.0E+51.0E+41.0E+31.0E+2101.00.100.000101.0E-71.0E-101.0E-131.0E-161.0E-191.0E-22
KILOHERTZ1.0E+271.0E+241.0E+211.0E+181.0E+151.0E+121.0E+91.0E+61.0E+51.0E+41.0E+31.0E+2101.00.00100.00000101.0E-91.0E-121.0E-151.0E-181.0E-21
MEGAHERTZ1.0E+301.0E+271.0E+241.0E+211.0E+181.0E+151.0E+121.0E+91.0E+81.0E+71.0E+61.0E+51.0E+41.0E+31.00.00100.00000101.0E-91.0E-121.0E-151.0E-18
GIGAHERTZ1.0E+331.0E+301.0E+271.0E+241.0E+211.0E+181.0E+151.0E+121.0E+111.0E+101.0E+91.0E+81.0E+71.0E+61.0E+31.00.00100.00000101.0E-91.0E-121.0E-15
TERAHERTZ1.0E+361.0E+331.0E+301.0E+271.0E+241.0E+211.0E+181.0E+151.0E+141.0E+131.0E+121.0E+111.0E+101.0E+91.0E+61.0E+31.00.00100.00000101.0E-91.0E-12
PETAHERTZ1.0E+391.0E+361.0E+331.0E+301.0E+271.0E+241.0E+211.0E+181.0E+171.0E+161.0E+151.0E+141.0E+131.0E+121.0E+91.0E+61.0E+31.00.00100.00000101.0E-9
ETAHERTZ1.0E+421.0E+391.0E+361.0E+331.0E+301.0E+271.0E+241.0E+211.0E+201.0E+191.0E+181.0E+171.0E+161.0E+151.0E+121.0E+91.0E+61.0E+31.00.00100.0000010
ZETTAHERTZ1.0E+451.0E+421.0E+391.0E+361.0E+331.0E+301.0E+271.0E+241.0E+231.0E+221.0E+211.0E+201.0E+191.0E+181.0E+151.0E+121.0E+91.0E+61.0E+31.00.0010
YOTTAHERTZ1.0E+481.0E+451.0E+421.0E+391.0E+361.0E+331.0E+301.0E+271.0E+261.0E+251.0E+241.0E+231.0E+221.0E+211.0E+181.0E+151.0E+121.0E+91.0E+61.0E+31.0
3This table was generated from the convertTo method of this class.

Version Info:

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

Since:
2006-03-31
Author:
David M. Harland

Enum Constant Summary
ATTOHERTZ
          10-18 cycles per second.
CENTIHERTZ
          0.01 cycles per second.
DECAHERTZ
          10 cycles per second.
DECIHERTZ
          0.1 cycles per second.
ETAHERTZ
          1018 cycles per second.
FEMTOHERTZ
          10-15 cycles per second.
GIGAHERTZ
          109 cycles per second.
HECTOHERTZ
          100 cycles per second.
HERTZ
          1 cycle per second.
KILOHERTZ
          1,000 cycles per second.
MEGAHERTZ
          106 cycles per second.
MICROHERTZ
          10-6 cycles per second.
MILLIHERTZ
          0.001 cycles per second.
NANOHERTZ
          10-9 cycles per second.
PETAHERTZ
          1015 cycles per second.
PICOHERTZ
          10-12 cycles per second.
TERAHERTZ
          1012 cycles per second.
YOCTOHERTZ
          10-24 cycles per second.
YOTTAHERTZ
          1024 cycles per second.
ZEPTOHERTZ
          10-21 cycles per second.
ZETTAHERTZ
          1021 cycles per second.
 
Method Summary
static FrequencyUnits fromString(String text)
          Returns the frequency units represented by text.
static FrequencyUnits getDefault()
          Returns a default unit of frequency.
static FrequencyUnits getForMultipleOfThreePower(int powerOfTen)
          Similar to getForPower(int), but the returned units will have a power that is evenly divisible by three.
static FrequencyUnits getForPower(int powerOfTen)
          Returns the units that corresponds to 1.0 * 10powerOfTen Hz.
static FrequencyUnits getLargest()
          Returns the element that represents the largest number of Hertz.
static FrequencyUnits getSmallest()
          Returns the element that represents the smallest number of Hertz.
 String getSymbol()
          Returns the symbol for this unit.
 boolean symbolsAreCaseSensitive()
          Returns true -- these symbols are case sensitive.
 BigDecimal toHertz()
          Returns the number of cycles per second for this unit.
 String toString()
          Returns a text representation of this enumeration constant.
 BigDecimal toUnits(FrequencyUnits otherUnits)
          Returns a factor for converting from this unit to otherUnits.
static FrequencyUnits valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FrequencyUnits[] 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

YOCTOHERTZ

public static final FrequencyUnits YOCTOHERTZ
10-24 cycles per second.


ZEPTOHERTZ

public static final FrequencyUnits ZEPTOHERTZ
10-21 cycles per second.


ATTOHERTZ

public static final FrequencyUnits ATTOHERTZ
10-18 cycles per second.


FEMTOHERTZ

public static final FrequencyUnits FEMTOHERTZ
10-15 cycles per second.


PICOHERTZ

public static final FrequencyUnits PICOHERTZ
10-12 cycles per second.


NANOHERTZ

public static final FrequencyUnits NANOHERTZ
10-9 cycles per second.


MICROHERTZ

public static final FrequencyUnits MICROHERTZ
10-6 cycles per second.


MILLIHERTZ

public static final FrequencyUnits MILLIHERTZ
0.001 cycles per second.


CENTIHERTZ

public static final FrequencyUnits CENTIHERTZ
0.01 cycles per second.


DECIHERTZ

public static final FrequencyUnits DECIHERTZ
0.1 cycles per second.


HERTZ

public static final FrequencyUnits HERTZ
1 cycle per second.


DECAHERTZ

public static final FrequencyUnits DECAHERTZ
10 cycles per second.


HECTOHERTZ

public static final FrequencyUnits HECTOHERTZ
100 cycles per second.


KILOHERTZ

public static final FrequencyUnits KILOHERTZ
1,000 cycles per second.


MEGAHERTZ

public static final FrequencyUnits MEGAHERTZ
106 cycles per second.


GIGAHERTZ

public static final FrequencyUnits GIGAHERTZ
109 cycles per second.


TERAHERTZ

public static final FrequencyUnits TERAHERTZ
1012 cycles per second.


PETAHERTZ

public static final FrequencyUnits PETAHERTZ
1015 cycles per second.


ETAHERTZ

public static final FrequencyUnits ETAHERTZ
1018 cycles per second.


ZETTAHERTZ

public static final FrequencyUnits ZETTAHERTZ
1021 cycles per second.


YOTTAHERTZ

public static final FrequencyUnits YOTTAHERTZ
1024 cycles per second.

Method Detail

values

public static FrequencyUnits[] 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 (FrequencyUnits c : FrequencyUnits.values())
    System.out.println(c);

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

valueOf

public static FrequencyUnits 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 Hertz is Hz.

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

toHertz

public BigDecimal toHertz()
Returns the number of cycles per second for this unit.

Returns:
the number of hertz in this unit.

toUnits

public BigDecimal toUnits(FrequencyUnits 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 FrequencyUnits getDefault()
Returns a default unit of frequency.

Returns:
a default unit of frequency.

getLargest

public static FrequencyUnits getLargest()
Returns the element that represents the largest number of Hertz.

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

getSmallest

public static FrequencyUnits getSmallest()
Returns the element that represents the smallest number of Hertz.

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

getForPower

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

If there is no units with the exact powerOfTen Hz, 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 Hz.

getForMultipleOfThreePower

public static FrequencyUnits 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<FrequencyUnits>
Returns:
a text representation of this enumeration constant.

fromString

public static FrequencyUnits fromString(String text)
Returns the frequency 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 millihertz (mHz) and megahertz (MHz).

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


Copyright © 2009. All Rights Reserved.