Package hec.util

Class Util

java.lang.Object
hec.util.Util

public class Util extends Object
Description of the Class
  • Field Details

  • Constructor Details

    • Util

      public Util()
  • Method Details

    • getSdfMsgTimeSecObj

      public static SimpleDateFormat getSdfMsgTimeSecObj()
      Gets the SdfMsgTimeSecObj attribute of the Util class
      Returns:
      The SdfMsgTimeSecObj value
    • getSdfMsgTimeSecUTCObj

      public static SimpleDateFormat getSdfMsgTimeSecUTCObj()
      Gets the SdfMsgTimeSecUTCObj attribute of the Util class
      Returns:
      The SdfMsgTimeSecUTCObj value
    • getKeyWordValue

      public static String getKeyWordValue(String line, String keyWord)
      Gets the KeyWordValue attribute of the Util class
      Parameters:
      line - Description of Parameter
      keyWord - Description of Parameter
      Returns:
      The KeyWordValue value
    • msgTime

      public static String msgTime()
      Description of the Method
      Returns:
      Description of the Returned Value
    • msgTimeUTC

      public static String msgTimeUTC()
      Description of the Method
      Returns:
      Description of the Returned Value
    • msgTimeSec

      public static String msgTimeSec()
      Description of the Method
      Returns:
      Description of the Returned Value
    • msgTimeSecUTC

      public static String msgTimeSecUTC()
      Description of the Method
      Returns:
      Description of the Returned Value
    • msgTime4UTC

      public static String msgTime4UTC()
    • msgTime

      public static String msgTime(long time)
      Description of the Method
      Parameters:
      time - Description of Parameter
      Returns:
      Description of the Returned Value
    • msgTimeUTC

      public static String msgTimeUTC(long time)
      Description of the Method
      Parameters:
      time - Description of Parameter
      Returns:
      Description of the Returned Value
    • msgTimeSec

      public static String msgTimeSec(long time)
      Description of the Method
      Parameters:
      time - Description of Parameter
      Returns:
      Description of the Returned Value
    • msgTimeSecUTC

      public static String msgTimeSecUTC(long time)
      Description of the Method
      Parameters:
      time - Description of Parameter
      Returns:
      Description of the Returned Value
    • msgTime4UTC

      public static String msgTime4UTC(long time)
    • parseLong

      public static long parseLong(String longString, long longDefault)
      Description of the Method
      Parameters:
      longString - Description of Parameter
      longDefault - Description of Parameter
      Returns:
      Description of the Returned Value
    • parseInt

      public static int parseInt(String intString, int intDefault)
      Description of the Method
      Parameters:
      intString - Description of Parameter
      intDefault - 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

      public static boolean matchesMask(String strArg, String maskArg, boolean caseSensitive)
      Description of the Method
      Parameters:
      strArg - Description of Parameter
      maskArg - Description of Parameter
      caseSensitive - Description of Parameter
      Returns:
      Description of the Returned Value
    • hasFileBeenModified

      public boolean hasFileBeenModified(String filename)
      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 Parameter
      milliSeconds - 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 milliseconds
      interval - interval to snap to in milliseconds
      Returns:
      closest interval in milliseconds
    • parseTimeIntervalString

      public static long parseTimeIntervalString(String timeInterval)
      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

      public static Process runProcess(String fileName) throws Exception
      Throws:
      Exception
    • getParentFrameFromJMenuItem

      public static 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 null
      Parameters:
      jMenuItem - JMenuItem
      Returns:
      JFrame