|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dmonix.util.ArrayHandler
Title: ArrayHandler Description: The class provides functions for different operations on arrays Copyright: Copyright (c) Company:
| Field Summary | |
static int |
ASCENDING
|
static int |
DESCENDING
|
| Constructor Summary | |
ArrayHandler()
|
|
| Method Summary | |
static byte[] |
addElement(byte[] array,
byte element)
Add an item to the end of the supplied array |
static int[] |
addElement(int[] array,
int element)
Add an item to the end of the supplied array |
static java.lang.String[] |
addElement(java.lang.String[] array,
java.lang.String element)
Add an item to the end of the supplied array |
static byte[] |
addElementAt(byte[] array,
byte element,
int index)
Add an item at the specific index of the supplied array |
static int[] |
addElementAt(int[] array,
int element,
int index)
Add an item at the specific index of the supplied array |
static java.lang.String[] |
addElementAt(java.lang.String[] array,
java.lang.String element,
int index)
Add an item at the specific index of the supplied array |
static int[] |
indexOf(byte[] array,
byte element)
Search the array for matching elements |
static int[] |
indexOf(int[] array,
int element)
Search the array for matching elements |
static int[] |
indexOf(java.lang.String[] array,
java.lang.String element)
Search the array for matching elements |
static byte[] |
removeElement(byte[] array,
byte element)
Remove all elements matching the supplied element |
static int[] |
removeElement(int[] array,
int element)
Remove all elements matching the supplied element |
static java.lang.String[] |
removeElement(java.lang.String[] array,
java.lang.String element)
Remove all elements matching the supplied element |
static byte[] |
removeElementAt(byte[] array,
int index)
Remove an element from the supplied array at the specific index |
static int[] |
removeElementAt(int[] array,
int index)
Remove an element from the supplied array at the specific index |
static java.lang.String[] |
removeElementAt(java.lang.String[] array,
int index)
Remove an element from the supplied array at the specific index |
static byte[] |
sort(byte[] array,
int sort)
Sorts the array |
static int[] |
sort(int[] array,
int sort)
Sorts the array |
static java.lang.String[] |
sort(java.lang.String[] array,
int sort)
Sorts the array |
static byte[] |
trimToSize(byte[] array,
int size)
Trims the capacity of this array to be the given size |
static int[] |
trimToSize(int[] array,
int size)
Trims the capacity of this array to be the given size |
static java.lang.String[] |
trimToSize(java.lang.String[] array,
int size)
Trims the capacity of this array to be the given size |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ASCENDING
public static final int DESCENDING
| Constructor Detail |
public ArrayHandler()
| Method Detail |
public static byte[] addElement(byte[] array,
byte element)
array - The array from which to add the elementelement - The element to add
public static int[] addElement(int[] array,
int element)
array - The array from which to add the elementelement - The element to add
public static java.lang.String[] addElement(java.lang.String[] array,
java.lang.String element)
array - The array from which to add the elementelement - The element to add
public static byte[] addElementAt(byte[] array,
byte element,
int index)
array - The array from which to add the elementelement - The element to addindex - The index from which to add the element
public static int[] addElementAt(int[] array,
int element,
int index)
array - The array from which to add the elementelement - The element to addindex - The index from which to add the element
public static java.lang.String[] addElementAt(java.lang.String[] array,
java.lang.String element,
int index)
array - The array from which to add the elementelement - The element to addindex - The index from which to add the element
public static int[] indexOf(byte[] array,
byte element)
array - The array from which to search for the elementelement - The element to search for
public static int[] indexOf(int[] array,
int element)
array - The array from which to search for the elementelement - The element to search for
public static int[] indexOf(java.lang.String[] array,
java.lang.String element)
array - The array from which to search for the elementelement - The element to search for
public static byte[] removeElement(byte[] array,
byte element)
array - The array from which to remove the element(s)element - The element to remove from the array
public static int[] removeElement(int[] array,
int element)
array - The array from which to remove the element(s)element - The element to remove from the array
public static java.lang.String[] removeElement(java.lang.String[] array,
java.lang.String element)
array - The array from which to remove the element(s)element - The element to remove from the array
public static byte[] removeElementAt(byte[] array,
int index)
array - The array from which to remove the elementindex - The index from which to remove the element
public static int[] removeElementAt(int[] array,
int index)
array - The array from which to remove the elementindex - The index from which to remove the element
public static java.lang.String[] removeElementAt(java.lang.String[] array,
int index)
array - The array from which to remove the elementindex - The index from which to remove the element
public static byte[] sort(byte[] array,
int sort)
array - The array to sortsort - Ascending/descending
public static int[] sort(int[] array,
int sort)
array - The array to sortsort - Ascending/descending
public static java.lang.String[] sort(java.lang.String[] array,
int sort)
array - The array to sortsort - Ascending/descending
public static byte[] trimToSize(byte[] array,
int size)
array - The array from which to remove the elementsize - The size to trim to
public static int[] trimToSize(int[] array,
int size)
array - The array from which to remove the elementsize - The size to trim to
public static java.lang.String[] trimToSize(java.lang.String[] array,
int size)
array - The array from which to remove the elementsize - The size to trim to
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||