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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanUtility method to check if the given string is empty ("") or null.static booleanisNotEmpty(String str) Utility method to check if the given string is not empty ("") or null.static StringUtility method to create mailTo linkstatic Stringprtdbl(double paramDblToFormat) Utility method to print double value up to the hundredth place.static Stringprttxt(int paramIntVal, ResourceBundle paramResBundObj) Utility method to print Text values for data speed related keys.static StringUtility 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'
-