public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
getFileResource(java.lang.String fileName)
Return the file path of a resource
|
static int |
getRandomNumberInRange(int min,
int max)
Generate a random number between a range
|
static void |
insertInArray(java.util.ArrayList arrayList,
int index,
java.lang.Object value)
Insert an Object into an ArrayList at an specific index (without erase the existing one)
|
static java.lang.String |
randomHashKey()
Generate random hash key (32 characters)
|
static java.util.ArrayList |
toArrayList(java.lang.Object[] array)
Convert a simple array to an ArrayList
|
public static java.io.File getFileResource(java.lang.String fileName)
fileName - Name of the resourcepublic static int getRandomNumberInRange(int min,
int max)
min - Min valuemax - Max valuepublic static void insertInArray(java.util.ArrayList arrayList,
int index,
java.lang.Object value)
arrayList - ArrayList to editindex - Index where insert the new objectvalue - Object to insertpublic static java.util.ArrayList toArrayList(java.lang.Object[] array)
array - Simple Arraypublic static java.lang.String randomHashKey()