

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.geotools.resources.XArray
Simple operations on arrays. This class provides a central place for inserting and deleting elements in an array, as well as resizing the array. This class may be removed if JavaSoft provide some language construct functionally equivalent to C/C++'s .
Method Summary  
static boolean 
hasNaN(double[] array)
Returns if the specified array contains at least one NaN value. 
static boolean 
hasNaN(float[] array)
Returns if the specified array contains at least one NaN value. 
static boolean[] 
insert(boolean[] src,
int src_pos,
boolean[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static boolean[] 
insert(boolean[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static byte[] 
insert(byte[] src,
int src_pos,
byte[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static byte[] 
insert(byte[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static char[] 
insert(char[] src,
int src_pos,
char[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static char[] 
insert(char[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static double[] 
insert(double[] src,
int src_pos,
double[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static double[] 
insert(double[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static float[] 
insert(float[] src,
int src_pos,
float[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static float[] 
insert(float[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static int[] 
insert(int[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static int[] 
insert(int[] src,
int src_pos,
int[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static long[] 
insert(long[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static long[] 
insert(long[] src,
int src_pos,
long[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static java.lang.Object[] 
insert(java.lang.Object[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static java.lang.Object[] 
insert(java.lang.Object[] src,
int src_pos,
java.lang.Object[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static short[] 
insert(short[] array,
int index,
int length)
Inserts spaces into the middle of a table. 
static short[] 
insert(short[] src,
int src_pos,
short[] dst,
int dst_pos,
int length)
Inserts a table slice into another table. 
static boolean 
isSorted(byte[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isSorted(char[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isSorted(double[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isSorted(float[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isSorted(int[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isSorted(long[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isSorted(short[] array)
Returns if all elements in the specified array are in increasing order. 
static boolean 
isStrictlySorted(int[] array)
Returns if all elements in the specified array are in strictly increasing order. 
static boolean[] 
remove(boolean[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static byte[] 
remove(byte[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static char[] 
remove(char[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static double[] 
remove(double[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static float[] 
remove(float[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static int[] 
remove(int[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static long[] 
remove(long[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static java.lang.Object[] 
remove(java.lang.Object[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static short[] 
remove(short[] array,
int index,
int length)
Grabs elements from the middle of a table. 
static boolean[] 
resize(boolean[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static byte[] 
resize(byte[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static char[] 
resize(char[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static double[] 
resize(double[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static float[] 
resize(float[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static int[] 
resize(int[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static long[] 
resize(long[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static java.lang.Object[] 
resize(java.lang.Object[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static short[] 
resize(short[] array,
int length)
Returns a new table which contains the same elements as but with the specified. 
static java.lang.String 
toString(java.lang.Object array,
java.util.Locale locale)
Returns a string representation of an array of numbers. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Method Detail 
public static java.lang.Object[] resize(java.lang.Object[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static double[] resize(double[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static float[] resize(float[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static long[] resize(long[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static int[] resize(int[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static short[] resize(short[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static byte[] resize(byte[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static char[] resize(char[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static boolean[] resize(boolean[] array, int length)
array
 Table to copy.length
 Length of the desired table.
public static java.lang.Object[] remove(java.lang.Object[] array, int index, int length)
array
 Table from which to grab the elements.index
 index of the first element to grab.
All subsequent elements can be moved forward.length
 Number of elements to grab.
public static double[] remove(double[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static float[] remove(float[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static long[] remove(long[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static int[] remove(int[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static short[] remove(short[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static byte[] remove(byte[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static char[] remove(char[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static boolean[] remove(boolean[] array, int index, int length)
array
 Table from which to grab elements.index
 index of the first element to grab.
All subsequent elements of
can be moved forward.length
 Number of elements to grab.
public static java.lang.Object[] insert(java.lang.Object[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static double[] insert(double[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static float[] insert(float[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static long[] insert(long[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static int[] insert(int[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static short[] insert(short[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static byte[] insert(byte[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static char[] insert(char[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static boolean[] insert(boolean[] array, int index, int length)
array
 Table in which to insert spaces.index
 index where spaces should be inserted.
All elements which have an index equal
to or higher than will be moved
forward.length
 Number of spaces to insert.
public static java.lang.Object[] insert(java.lang.Object[] src, int src_pos, java.lang.Object[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static double[] insert(double[] src, int src_pos, double[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static float[] insert(float[] src, int src_pos, float[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static long[] insert(long[] src, int src_pos, long[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static int[] insert(int[] src, int src_pos, int[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static short[] insert(short[] src, int src_pos, short[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static byte[] insert(byte[] src, int src_pos, byte[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static char[] insert(char[] src, int src_pos, char[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static boolean[] insert(boolean[] src, int src_pos, boolean[] dst, int dst_pos, int length)
src
 Tablea to insert into .src_pos
 Index of the first data item of to
insert into .dst
 Table in which to insert data.dst_pos
 index in which to insert
data. All elements of
whose index is equal to or greater than
will be moved forward.length
 Number of data items to insert.
public static boolean isSorted(char[] array)
public static boolean isSorted(byte[] array)
public static boolean isSorted(short[] array)
public static boolean isSorted(int[] array)
public static boolean isSorted(long[] array)
public static boolean isSorted(float[] array)
public static boolean isSorted(double[] array)
public static boolean isStrictlySorted(int[] array)
public static boolean hasNaN(double[] array)
NaN
value.
public static boolean hasNaN(float[] array)
NaN
value.
public static java.lang.String toString(java.lang.Object array, java.util.Locale locale)
Number
.
array
 The array to format.locale
 The locale for formatting.
LineFormat
instead?


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 