Package hec.util
Class Util
java.lang.Object
hec.util.Util
Description of the Class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getKeyWordValue
(String line, String keyWord) Gets the KeyWordValue attribute of the Util classstatic JFrame
getParentFrameFromJMenuItem
(JMenuItem jMenuItem) Given a menu item that has come from a JFrame, get and return that frame If can't get it, return nullstatic SimpleDateFormat
Gets the SdfMsgTimeSecObj attribute of the Util classstatic SimpleDateFormat
Gets the SdfMsgTimeSecUTCObj attribute of the Util classboolean
hasFileBeenModified
(String filename) Description of the Methodboolean
hasTimeExpired
(int minutes, int milliSeconds) Description of the Methodstatic boolean
matchesMask
(String strArg, String maskArg, boolean caseSensitive) Description of the Methodstatic String
msgTime()
Description of the Methodstatic String
msgTime
(long time) Description of the Methodstatic String
static String
msgTime4UTC
(long time) static String
Description of the Methodstatic String
msgTimeSec
(long time) Description of the Methodstatic String
Description of the Methodstatic String
msgTimeSecUTC
(long time) Description of the Methodstatic String
Description of the Methodstatic String
msgTimeUTC
(long time) Description of the Methodstatic int
Description of the Methodstatic long
Description of the Methodstatic long
parseTimeIntervalString
(String timeInterval) Interprets time interval strings such as "6HOURS", "1MONTH" as milliseconds.static Process
runProcess
(String fileName) static long
snapTimeToNearestInterval
(long timeIn, long interval) Returns the closest interval for a specified timestatic void
waitMillis
(int millis) Description of the Method
-
Field Details
-
UNDEFINED
Description of the Field- See Also:
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getSdfMsgTimeSecObj
Gets the SdfMsgTimeSecObj attribute of the Util class- Returns:
- The SdfMsgTimeSecObj value
-
getSdfMsgTimeSecUTCObj
Gets the SdfMsgTimeSecUTCObj attribute of the Util class- Returns:
- The SdfMsgTimeSecUTCObj value
-
getKeyWordValue
Gets the KeyWordValue attribute of the Util class- Parameters:
line
- Description of ParameterkeyWord
- Description of Parameter- Returns:
- The KeyWordValue value
-
msgTime
Description of the Method- Returns:
- Description of the Returned Value
-
msgTimeUTC
Description of the Method- Returns:
- Description of the Returned Value
-
msgTimeSec
Description of the Method- Returns:
- Description of the Returned Value
-
msgTimeSecUTC
Description of the Method- Returns:
- Description of the Returned Value
-
msgTime4UTC
-
msgTime
Description of the Method- Parameters:
time
- Description of Parameter- Returns:
- Description of the Returned Value
-
msgTimeUTC
Description of the Method- Parameters:
time
- Description of Parameter- Returns:
- Description of the Returned Value
-
msgTimeSec
Description of the Method- Parameters:
time
- Description of Parameter- Returns:
- Description of the Returned Value
-
msgTimeSecUTC
Description of the Method- Parameters:
time
- Description of Parameter- Returns:
- Description of the Returned Value
-
msgTime4UTC
-
parseLong
Description of the Method- Parameters:
longString
- Description of ParameterlongDefault
- Description of Parameter- Returns:
- Description of the Returned Value
-
parseInt
Description of the Method- Parameters:
intString
- Description of ParameterintDefault
- Description of Parameter- Returns:
- Description of the Returned Value
-
waitMillis
public static void waitMillis(int millis) Description of the Method- Parameters:
millis
- Description of Parameter
-
matchesMask
Description of the Method- Parameters:
strArg
- Description of ParametermaskArg
- Description of ParametercaseSensitive
- Description of Parameter- Returns:
- Description of the Returned Value
-
hasFileBeenModified
Description of the Method- Parameters:
filename
- Description of Parameter- Returns:
- Description of the Returned Value
-
hasTimeExpired
public boolean hasTimeExpired(int minutes, int milliSeconds) Description of the Method- Parameters:
minutes
- Description of ParametermilliSeconds
- Description of Parameter- Returns:
- Description of the Returned Value
-
snapTimeToNearestInterval
public static long snapTimeToNearestInterval(long timeIn, long interval) Returns the closest interval for a specified time- Parameters:
timeIn
- time to snap to closest interval in millisecondsinterval
- interval to snap to in milliseconds- Returns:
- closest interval in milliseconds
-
parseTimeIntervalString
Interprets time interval strings such as "6HOURS", "1MONTH" as milliseconds. (1 month = 30 days, 1 year = 365 days)- Parameters:
timeInterval
- The time interval string to interpret.- Returns:
- The interpreted time interval in milliseconds.
-
runProcess
- Throws:
Exception
-
getParentFrameFromJMenuItem
Given a menu item that has come from a JFrame, get and return that frame If can't get it, return null- Parameters:
jMenuItem
- JMenuItem- Returns:
- JFrame
-