Package hec.lang
Class TimeStep
java.lang.Object
hec.lang.TimeStep
This class implements static methods for converting a
standard String representation of a time step interval (e.g. "1 Hour")
to an integer value for the time step and
the time increment type (e.g. hec.heclib.util.HecTime.HOUR_INCREMENT)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getDssIntervalString
(int timeStep, int timeInc) Convert integer time step value and HecTime increment type to get time step string as standard dss interval name (e.g.static String
getEPartFromIntervalMinutes
(int intervalMinutes) convert integer minutes to standard dss interval name (e.g.static int
getTimeIncrement
(String timeString) Parse the time interval string to get the standard HecTime time increment typestatic int
getTimeStep
(String timeString) Parse the time interval string to extract the integer value of the time step.static int
getTimeStepMinutes
(int timeStep, int incrementType) interpret increment type to convert time step to minutesstatic int
getTimeStepMinutes
(String timeString) static String
getTimeStepString
(int timeStep, int timeInc) Convert integer time step value and HecTime increment type to get time step stringstatic void
-
Field Details
-
TIME_STEP_STRINGS
Standard intervals for model time steps
-
-
Constructor Details
-
TimeStep
public TimeStep()Default constructor
-
-
Method Details
-
getTimeStep
Parse the time interval string to extract the integer value of the time step. Should be used togetn- Parameters:
timeString
- - a standard time interval string- Returns:
-
getTimeIncrement
Parse the time interval string to get the standard HecTime time increment type- Parameters:
timeString
- - a standard time interval string- Returns:
-
getTimeStepString
Convert integer time step value and HecTime increment type to get time step string -
getDssIntervalString
Convert integer time step value and HecTime increment type to get time step string as standard dss interval name (e.g. "1HOUR", "10MIN" ) -
getEPartFromIntervalMinutes
convert integer minutes to standard dss interval name (e.g. "1HOUR", "10MIN" ) -
getTimeStepMinutes
public static int getTimeStepMinutes(int timeStep, int incrementType) interpret increment type to convert time step to minutes -
getTimeStepMinutes
-
main
-