Package org.pentaho.di.core.util
Class Utils
- java.lang.Object
-
- org.pentaho.di.core.util.Utils
-
public class Utils extends Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getDamerauLevenshteinDistance(String s, String t)
static boolean
isEmpty(CharSequence val)
Check if the CharSequence supplied is empty.static boolean
isEmpty(CharSequence[] strings)
Check if the CharSequence array supplied is empty.static boolean
isEmpty(Object[] array)
Check if the array supplied is empty.static boolean
isEmpty(List<?> list)
Check if the list supplied is empty.static boolean[][]
normalizeArrays(int normalizeToLength, boolean[]... arraysToNormalize)
Normalize boolean array lengths for synchronization of arrays within stepsstatic int[][]
normalizeArrays(int normalizeToLength, int[]... arraysToNormalize)
Normalize int array lengths for synchronization of arrays within stepsstatic long[][]
normalizeArrays(int normalizeToLength, long[]... arraysToNormalize)
Normalize long array lengths for synchronization of arrays within stepsstatic short[][]
normalizeArrays(int normalizeToLength, short[]... arraysToNormalize)
Normalize short array lengths for synchronization of arrays within stepsstatic String[][]
normalizeArrays(int normalizeToLength, String[]... arraysToNormalize)
Normalize String array lengths for synchronization of arrays within stepsstatic String
resolvePassword(VariableSpace variables, String password)
Resolves password from variable if it's necessary and decrypts if the password was encrypted
-
-
-
Method Detail
-
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 resolvingpassword
- 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
-
-