|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.util.ArrayUtils
public class ArrayUtils
Utility methods to have indexed access for insertion and deletion of array items. Based on original code from dbXML.
| Constructor Summary | |
|---|---|
ArrayUtils()
|
|
| Method Summary | |
|---|---|
static int |
binarySearch(int[] a,
int key,
int size)
Searches the specified array of ints for the specified value using the binary search algorithm. |
static int[] |
deleteArrayInt(int[] vals,
int idx)
Delete an integer. |
static long[] |
deleteArrayLong(long[] vals,
int idx)
Delete a long. |
static short[] |
deleteArrayShort(short[] vals,
int idx)
Delete a short. |
static int[] |
insertArrayInt(int[] vals,
int val,
int idx)
Insert a integer. |
static long[] |
insertArrayLong(long[] vals,
long val,
int idx)
Insert a long. |
static short[] |
insertArrayShort(short[] vals,
short val,
int idx)
Insert a short. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayUtils()
| Method Detail |
|---|
public static int[] deleteArrayInt(int[] vals,
int idx)
vals - array of integersidx - index of integer to delete
public static long[] deleteArrayLong(long[] vals,
int idx)
vals - array of longsidx - index of long to delete
public static short[] deleteArrayShort(short[] vals,
int idx)
vals - array of shortsidx - index of short to delete
public static int[] insertArrayInt(int[] vals,
int val,
int idx)
vals - array of integersval - integer to insertidx - index of insertion
public static long[] insertArrayLong(long[] vals,
long val,
int idx)
vals - array of longsval - long to insertidx - index of insertion
public static short[] insertArrayShort(short[] vals,
short val,
int idx)
vals - array of shortsval - short to insertidx - index of insertion
public static int binarySearch(int[] a,
int key,
int size)
a - the array to be searched.key - the value to be searched for.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||