|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.agmodel.weatherData.MetDuration
A set of type-safe constants for measurement frequencies used in agrometeorology
The ordinal values of these constants are used for persistent storage of metadata,
so they should be changed with caution.
Use them just like standard int constants eg MetDuration.ONE_HOUR
Follows the style for typed classes described in "Create enumerated constants in Java" by Eric Armstrong
JavaWorld July 1997
(Uses net.agmodel.resources.UtilityResources for the duration names).
| Field Summary | |
static MetDuration |
DAILY
|
static MetDuration |
HOURLY
|
static MetDuration |
MONTHLY
|
int |
ord
|
protected static ResourceBundle |
rb
|
static MetDuration |
SUBHOURLY
|
| Method Summary | |
static MetDuration |
categoriseDuration(Duration input)
Maps the input duration to the nearest MetDuration. |
int |
compareTo(Object another)
|
static MetDuration |
elementFromOrd(int ordIndex)
Gets a metduration based on its ordinal index. |
static MetDuration |
first()
|
Duration |
getDuration(Duration shortestAvailable)
Maps this metDuration to the appropriate Duration. |
String |
getName()
|
static Iterator |
iterator()
|
static MetDuration |
last()
|
static MetDuration |
lookup(String name)
Finds the MetDuration whose .toString() matches the parameter |
MetDuration |
next()
|
MetDuration |
prev()
|
static int |
size()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static ResourceBundle rb
public static final MetDuration SUBHOURLY
public static final MetDuration HOURLY
public static final MetDuration DAILY
public static final MetDuration MONTHLY
public final int ord
| Method Detail |
public static Iterator iterator()
public String toString()
toString in class Objectpublic String getName()
public static int size()
public static MetDuration first()
public static MetDuration last()
public MetDuration prev()
public MetDuration next()
public static MetDuration lookup(String name)
public int compareTo(Object another)
compareTo in interface Comparablepublic static MetDuration categoriseDuration(Duration input)
input - the Duration to categorise
public static MetDuration elementFromOrd(int ordIndex)
ordIndex - the ordinal index of a duration
public Duration getDuration(Duration shortestAvailable)
shortestAvailable - the shortest duration available from a station
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||