Class CustomUtils


  • public class CustomUtils
    extends java.lang.Object
    Support methods used by customization code.
    Author:
    Dennis M. Sosnoski
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set addNoCaseSet​(java.lang.String[] names, java.util.Set set)
      Utility method to add an array of names to a set, ignoring case.
      static void clean​(java.io.File dir)
      Clean directory by recursively deleting children.
      static java.util.Set nameSet​(java.lang.String[] names)
      Utility method to build a set from an array of names.
      static java.util.Set noCaseNameSet​(java.lang.String[] names)
      Utility method to build a set from an array of names, ignoring case.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomUtils

        public CustomUtils()
    • Method Detail

      • addNoCaseSet

        public static java.util.Set addNoCaseSet​(java.lang.String[] names,
                                                 java.util.Set set)
        Utility method to add an array of names to a set, ignoring case. All the supplied names are converted to lower case before they are added to the set.
        Parameters:
        names - (null if none)
        set - base set of names (null if none)
        Returns:
        name set (null if none)
      • noCaseNameSet

        public static java.util.Set noCaseNameSet​(java.lang.String[] names)
        Utility method to build a set from an array of names, ignoring case. All the supplied names are converted to lower case before they are added to the set.
        Parameters:
        names - (null if none)
        Returns:
        name set (null if name array also null, otherwise non-null)
      • nameSet

        public static java.util.Set nameSet​(java.lang.String[] names)
        Utility method to build a set from an array of names.
        Parameters:
        names - (null if none)
        Returns:
        name set (null if name array also null, otherwise non-null)
      • clean

        public static void clean​(java.io.File dir)
        Clean directory by recursively deleting children.
        Parameters:
        dir - directory to be cleaned