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 StringgetKeyWordValue(String line, String keyWord) Gets the KeyWordValue attribute of the Util classstatic JFramegetParentFrameFromJMenuItem(JMenuItem jMenuItem) Given a menu item that has come from a JFrame, get and return that frame If can't get it, return nullstatic SimpleDateFormatGets the SdfMsgTimeSecObj attribute of the Util classstatic SimpleDateFormatGets the SdfMsgTimeSecUTCObj attribute of the Util classbooleanhasFileBeenModified(String filename) Description of the MethodbooleanhasTimeExpired(int minutes, int milliSeconds) Description of the Methodstatic booleanmatchesMask(String strArg, String maskArg, boolean caseSensitive) Description of the Methodstatic StringmsgTime()Description of the Methodstatic StringmsgTime(long time) Description of the Methodstatic Stringstatic StringmsgTime4UTC(long time) static StringDescription of the Methodstatic StringmsgTimeSec(long time) Description of the Methodstatic StringDescription of the Methodstatic StringmsgTimeSecUTC(long time) Description of the Methodstatic StringDescription of the Methodstatic StringmsgTimeUTC(long time) Description of the Methodstatic intDescription of the Methodstatic longDescription of the Methodstatic longparseTimeIntervalString(String timeInterval) Interprets time interval strings such as "6HOURS", "1MONTH" as milliseconds.static ProcessrunProcess(String fileName) static longsnapTimeToNearestInterval(long timeIn, long interval) Returns the closest interval for a specified timestatic voidwaitMillis(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
-