Package edu.internet2.ndt
Class NDTUtils
- java.lang.Object
-
- edu.internet2.ndt.NDTUtils
-
public class NDTUtils extends Object
Class that defines utility methods used by the NDT code
-
-
Constructor Summary
Constructors Constructor Description NDTUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isEmpty(String str)
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
mailTo(String name, String host, String subject, String body)
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
urlEncode(String str)
Utility method to encode the given string using UTF-8 encoding
-
-
-
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 identifierhost
- fully qualified domain namesubject
- email subjectbody
- email body- Returns:
- created mailTo link with the encoded parameters
-
-