Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • getDamerauLevenshteinDistance

        public static int getDamerauLevenshteinDistance​(String s,
                                                        String t)
      • isEmpty

        public static boolean isEmpty​(CharSequence val)
        Check if the CharSequence supplied is empty. A CharSequence is empty when it is null or when the length is 0
        Parameters:
        val - The stringBuffer to check
        Returns:
        true if the stringBuffer supplied is empty
      • isEmpty

        public static boolean isEmpty​(CharSequence[] strings)
        Check if the CharSequence array supplied is empty. A CharSequence array is empty when it is null or when the number of elements is 0
        Parameters:
        strings - The string array to check
        Returns:
        true if the string array supplied is empty
      • isEmpty

        public static boolean isEmpty​(Object[] array)
        Check if the array supplied is empty. An array is empty when it is null or when the length is 0
        Parameters:
        array - The array to check
        Returns:
        true if the array supplied is empty
      • isEmpty

        public static boolean isEmpty​(List<?> list)
        Check if the list supplied is empty. An array is empty when it is null or when the length is 0
        Parameters:
        list - the list to check
        Returns:
        true if the supplied list is empty
      • resolvePassword

        public static String resolvePassword​(VariableSpace variables,
                                             String password)
        Resolves password from variable if it's necessary and decrypts if the password was encrypted
        Parameters:
        variables - VariableSpace is used for resolving
        password - the password for resolving and decrypting
        Returns:
        resolved decrypted password
      • normalizeArrays

        public static String[][] normalizeArrays​(int normalizeToLength,
                                                 String[]... arraysToNormalize)
        Normalize String array lengths for synchronization of arrays within steps
      • normalizeArrays

        public static long[][] normalizeArrays​(int normalizeToLength,
                                               long[]... arraysToNormalize)
        Normalize long array lengths for synchronization of arrays within steps
      • normalizeArrays

        public static int[][] normalizeArrays​(int normalizeToLength,
                                              int[]... arraysToNormalize)
        Normalize int array lengths for synchronization of arrays within steps
      • normalizeArrays

        public static boolean[][] normalizeArrays​(int normalizeToLength,
                                                  boolean[]... arraysToNormalize)
        Normalize boolean array lengths for synchronization of arrays within steps
      • normalizeArrays

        public static short[][] normalizeArrays​(int normalizeToLength,
                                                short[]... arraysToNormalize)
        Normalize short array lengths for synchronization of arrays within steps