|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.hsqldb.lib.ArrayUtil
Collection of static methods for operations on arrays
| Constructor Summary | |
ArrayUtil()
|
|
| Method Summary | |
static void |
copyAdjustArray(java.lang.Object[] source,
java.lang.Object[] dest,
java.lang.Object addition,
int colindex,
int adjust)
Copies elements of source to dest. |
static void |
copyArray(int[] source,
int[] dest,
int count)
|
static void |
copyColumnValues(java.lang.Object[] row,
int[] colindex,
java.lang.Object[] colobject)
Copies some elements of row into colobject by using colindex as the list of indexes into row. |
static int[] |
getAdjustedColumnArray(int[] colarr,
int size,
int colindex,
int adjust)
Convenience wrapper for toAdjustedColumnArray() that creates the new array. |
static boolean |
haveCommonElement(int[] a,
int[] b,
int lenb)
Checks for any overlap between two arrays of column indexes. |
static boolean |
haveEqualArrays(int[] a,
int[] b,
int count)
Returns true if the first count elements of a and b are identical subarrays of integers |
static boolean |
haveEquality(int[] a,
int[] b,
int count,
boolean sets)
For sets == true returns true if a and b are the same length and contain the same set of integers. |
static boolean |
haveEqualSets(int[] a,
int[] b,
int count)
Returns true if the first count elements of a and b are identical sets of integers |
static void |
sortArray(int[] intarr)
Basic sort for small arrays. |
static int[] |
toAdjustedColumnArray(int[] colarr,
int colindex,
int adjust)
Returns new array with the elements in collar ajusted to reflect changes at colindex. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArrayUtil()
| Method Detail |
public static void sortArray(int[] intarr)
public static boolean haveEquality(int[] a,
int[] b,
int count,
boolean sets)
public static boolean haveEqualSets(int[] a,
int[] b,
int count)
public static boolean haveEqualArrays(int[] a,
int[] b,
int count)
public static boolean haveCommonElement(int[] a,
int[] b,
int lenb)
public static void copyArray(int[] source,
int[] dest,
int count)
public static void copyAdjustArray(java.lang.Object[] source,
java.lang.Object[] dest,
java.lang.Object addition,
int colindex,
int adjust)
source - dest - addition - colindex - adjust - +1 or 0 or -1
return new, adjusted array or null if an element is removed
public static int[] toAdjustedColumnArray(int[] colarr,
int colindex,
int adjust)
colarr - colindex - adjust - +1 or 0 or -1
return new, adjusted array
public static int[] getAdjustedColumnArray(int[] colarr,
int size,
int colindex,
int adjust)
public static void copyColumnValues(java.lang.Object[] row,
int[] colindex,
java.lang.Object[] colobject)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||