public final class Utilities
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
Utilities()
To avoid instance
|
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(char character,
char... array)
Indicates if a character is inside an array
|
static int[] |
createCopy(int[] array)
Create a int array copy
|
static <T> T[] |
createCopy(T[] array)
Create an array copy
|
static int |
indexOf(byte[] container,
byte[] content,
int offset,
int length)
Compute index of byte array inside an other byt array
|
static int |
indexOf(char[] array,
char element)
Obtain a character index inside a character array.
|
static <T> int |
indexOf(T[] array,
T element)
Index of an element inside an array
|
static void |
sleep(long milliseconds)
Make thread call it sleep for specified time in milliseconds
|
public static boolean contains(char character, char... array)
character
- Character searcharray
- Array where searchpublic static int[] createCopy(int[] array)
array
- Array to copypublic static <T> T[] createCopy(T[] array)
T
- Type of array elementsarray
- Array to copypublic static int indexOf(byte[] container, byte[] content, int offset, int length)
container
- Byte array where search the contentcontent
- Searched array inside the containeroffset
- Offset to start the searchlength
- Number of byte to take care inside the contentpublic static int indexOf(char[] array, char element)
array
- Array where search the characterelement
- Searched characterpublic static <T> int indexOf(T[] array, T element)
T
- Element typearray
- Array where searchelement
- Element searchpublic static final void sleep(long milliseconds)
milliseconds
- Time to sleep in milliseconds