Class NDTUtils


  • public class NDTUtils
    extends Object
    Class that defines utility methods used by the NDT code
    • Constructor Detail

      • NDTUtils

        public NDTUtils()
    • Method Detail

      • prtdbl

        public static String prtdbl​(double paramDblToFormat)
        Utility method to print double value up to the hundredth place.
        Parameters:
        paramDblToFormat - Double numbers to format
        Returns:
        String value of double number
      • prttxt

        public static String prttxt​(int paramIntVal,
                                    ResourceBundle paramResBundObj)
        Utility method to print Text values for data speed related keys.
        Parameters:
        paramIntVal - integer parameter for which we find text value
        Returns:
        String Textual name for input parameter
      • isEmpty

        public static boolean isEmpty​(String str)
        Utility method to check if the given string is empty ("") or null.
        Parameters:
        str - String to check
        Returns:
        true is the given string is empty; otherwise false
      • isNotEmpty

        public static boolean isNotEmpty​(String str)
        Utility method to check if the given string is not empty ("") or null.
        Parameters:
        str - String to check
        Returns:
        true is the given string is not empty; otherwise false
      • mailTo

        public static String mailTo​(String name,
                                    String host,
                                    String subject,
                                    String body)
        Utility method to create mailTo link
        Parameters:
        name - user identifier
        host - fully qualified domain name
        subject - email subject
        body - email body
        Returns:
        created mailTo link with the encoded parameters
      • urlEncode

        public static String urlEncode​(String str)
        Utility method to encode the given string using UTF-8 encoding
        Parameters:
        str - String to encode
        Returns:
        encoded string with replacing '+' to '%20'