java.lang.Object
edu.internet2.ndt.NDTUtils

public class NDTUtilsextends Object
Class that defines utility methods used by the NDT code.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Every method here is static and the class holds no fields, so an instance adds nothing; it exists only to give the utility class a documented entry point.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    static boolean
    Utility method to check if the given string is empty ("") or null.
    static boolean
    Utility method to check if the given string is not empty ("") or null.
    static String
    prtdbl(double paramDblToFormat)
    Utility method to print double value up to the hundredth place.
    static String
    Utility method to encode the given string using UTF-8 encoding.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NDTUtils

      public NDTUtils()
      Every method here is static and the class holds no fields, so an instance adds nothing; it exists only to give the utility class a documented entry point.
  • Method Details

    • 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
    • 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
    • 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'