Package gov.usgs.earthquake.nshmp.gmm
Enum Imt
- java.lang.Object
-
- java.lang.Enum<Imt>
-
- gov.usgs.earthquake.nshmp.gmm.Imt
-
- All Implemented Interfaces:
Serializable
,Comparable<Imt>
public enum Imt extends Enum<Imt>
Intesity measure type (Imt) identifiers.SA0P1
stands for spectal acceleration of 0.1 seconds.- Author:
- U.S. Geological Survey
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AI
ASI
CAV
DS575
DS595
DSI
PGA
PGD
PGV
SA0P01
SA0P02
SA0P025
SA0P03
SA0P04
SA0P05
SA0P06
SA0P07
SA0P075
SA0P08
SA0P09
SA0P1
SA0P12
SA0P14
SA0P15
SA0P16
SA0P17
SA0P18
SA0P2
SA0P25
SA0P3
SA0P35
SA0P4
SA0P45
SA0P5
SA0P6
SA0P7
SA0P75
SA0P8
SA0P9
SA10P0
SA1P0
SA1P25
SA1P5
SA2P0
SA2P5
SA3P0
SA3P5
SA4P0
SA4P5
SA5P0
SA6P0
SA7P5
SI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
frequency()
Returns the frequency (in Hz) for thisImt
.static Imt
fromPeriod(double period)
Returns the spectral accelerationImt
associated with the supplied period.boolean
isSA()
Returns true if thisImt
represents a spectral acceleration.static Set<Imt>
mprsImts()
Returns theSet
of multi-period response spectra IMTs used in building code applications.double
period()
Returns the corresponding period for thisImt
if it represents a spectral acceleration and throws anUnsupportedOperationException
otherwise.static Set<Imt>
saImts()
Returns theSet
of spectral acceleration IMTs.String
toString()
String
units()
Return the units in which thisImt
is measured.static Imt
valueOf(String name)
Returns the enum constant of this type with the specified name.static Imt[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PGA
public static final Imt PGA
-
PGV
public static final Imt PGV
-
PGD
public static final Imt PGD
-
ASI
public static final Imt ASI
-
SI
public static final Imt SI
-
DSI
public static final Imt DSI
-
CAV
public static final Imt CAV
-
DS575
public static final Imt DS575
-
DS595
public static final Imt DS595
-
AI
public static final Imt AI
-
SA0P01
public static final Imt SA0P01
-
SA0P02
public static final Imt SA0P02
-
SA0P025
public static final Imt SA0P025
-
SA0P03
public static final Imt SA0P03
-
SA0P04
public static final Imt SA0P04
-
SA0P05
public static final Imt SA0P05
-
SA0P06
public static final Imt SA0P06
-
SA0P07
public static final Imt SA0P07
-
SA0P075
public static final Imt SA0P075
-
SA0P08
public static final Imt SA0P08
-
SA0P09
public static final Imt SA0P09
-
SA0P1
public static final Imt SA0P1
-
SA0P12
public static final Imt SA0P12
-
SA0P14
public static final Imt SA0P14
-
SA0P15
public static final Imt SA0P15
-
SA0P16
public static final Imt SA0P16
-
SA0P17
public static final Imt SA0P17
-
SA0P18
public static final Imt SA0P18
-
SA0P2
public static final Imt SA0P2
-
SA0P25
public static final Imt SA0P25
-
SA0P3
public static final Imt SA0P3
-
SA0P35
public static final Imt SA0P35
-
SA0P4
public static final Imt SA0P4
-
SA0P45
public static final Imt SA0P45
-
SA0P5
public static final Imt SA0P5
-
SA0P6
public static final Imt SA0P6
-
SA0P7
public static final Imt SA0P7
-
SA0P75
public static final Imt SA0P75
-
SA0P8
public static final Imt SA0P8
-
SA0P9
public static final Imt SA0P9
-
SA1P0
public static final Imt SA1P0
-
SA1P25
public static final Imt SA1P25
-
SA1P5
public static final Imt SA1P5
-
SA2P0
public static final Imt SA2P0
-
SA2P5
public static final Imt SA2P5
-
SA3P0
public static final Imt SA3P0
-
SA3P5
public static final Imt SA3P5
-
SA4P0
public static final Imt SA4P0
-
SA4P5
public static final Imt SA4P5
-
SA5P0
public static final Imt SA5P0
-
SA6P0
public static final Imt SA6P0
-
SA7P5
public static final Imt SA7P5
-
SA10P0
public static final Imt SA10P0
-
-
Method Detail
-
values
public static Imt[] 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 (Imt c : Imt.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Imt 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 nameNullPointerException
- if the argument is null
-
units
public String units()
Return the units in which thisImt
is measured.
-
period
public double period()
Returns the corresponding period for thisImt
if it represents a spectral acceleration and throws anUnsupportedOperationException
otherwise. Rather than trying to catch the exception, users should callisSA()
to check validity of thisImt
before calling this method.- Returns:
- the period for this
Imt
if it represents a spectral acceleration - Throws:
UnsupportedOperationException
- if thisImt
is not a spectral acceleration
-
fromPeriod
public static Imt fromPeriod(double period)
Returns the spectral accelerationImt
associated with the supplied period. Due to potential floating point precision problems, this method internally checks values to within a small tolerance.- Parameters:
period
- forImt
- Returns:
- an
Imt
, ornull
if no Imt exsists for the supplied period
-
frequency
public double frequency()
Returns the frequency (in Hz) for thisImt
.PGA
returns 100 Hz, spectral periods return their expected value (1 / period), andPGV
andPGD
throw exceptions.- Returns:
- the frequency associated with this
Imt
- Throws:
UnsupportedOperationException
- if called onPGV
orPGD
-
isSA
public boolean isSA()
Returns true if thisImt
represents a spectral acceleration.- Returns:
true
if this is a spectral accelerationImt
,false
otherwise
-
saImts
public static Set<Imt> saImts()
Returns theSet
of spectral acceleration IMTs.- Returns:
- the set of spectral acceleration IMTs
-
mprsImts
public static Set<Imt> mprsImts()
Returns theSet
of multi-period response spectra IMTs used in building code applications.[ PGA, 0.01s, 0.02s, 0.03s, 0.05s, 0.075s, 0.1s, 0.15s, 0.2s, 0.25s, 0.3s, 0.4s, 0.5s, 0.75s, 1.0s, 1.5s, 2.0s, 3.0s, 4.0s, 5.0s, 7.5s, 10.0s ]}
- Returns:
- the set of multi-period response spectra IMTs
-
-