Package edu.internet2.ndt
Class NDTUtils
java.lang.Object
edu.internet2.ndt.NDTUtils
Class that defines utility methods used by the NDT code
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Utility method to check if the given string is empty ("") or null.static boolean
isNotEmpty
(String str) Utility method to check if the given string is not empty ("") or null.static String
Utility method to create mailTo linkstatic String
prtdbl
(double paramDblToFormat) Utility method to print double value up to the hundredth place.static String
prttxt
(int paramIntVal, ResourceBundle paramResBundObj) Utility method to print Text values for data speed related keys.static String
Utility method to encode the given string using UTF-8 encoding
-
Constructor Details
-
NDTUtils
public NDTUtils()
-
-
Method Details
-
prtdbl
Utility method to print double value up to the hundredth place.- Parameters:
paramDblToFormat
- Double numbers to format- Returns:
- String value of double number
-
prttxt
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
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
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
Utility method to create mailTo link- Parameters:
name
- user identifierhost
- fully qualified domain namesubject
- email subjectbody
- email body- Returns:
- created mailTo link with the encoded parameters
-
urlEncode
Utility method to encode the given string using UTF-8 encoding- Parameters:
str
- String to encode- Returns:
- encoded string with replacing '+' to '%20'
-