| java.lang.Object org.geotools.resources.XArray
XArray | final public class XArray (Code) | | 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
realloc .
since: 2.0 version: $Id: XArray.java 22443 2006-10-27 20:47:22Z desruisseaux $ author: Martin Desruisseaux resize Arrays.copyOf |
Method Summary | |
public static boolean | hasNaN(double[] array) Returns
true if the specified array contains at least one
Double.NaN NaN value. | public static boolean | hasNaN(float[] array) Returns
true if the specified array contains at least one
Float.NaN NaN value. | public static Object[] | insert(Object[] array, int index, int length) Inserts spaces into the middle of a table. | public static double[] | insert(double[] array, int index, int length) Inserts spaces into the middle of a table. | public static float[] | insert(float[] array, int index, int length) Inserts spaces into the middle of a table. | public static long[] | insert(long[] array, int index, int length) Inserts spaces into the middle of a table. | public static int[] | insert(int[] array, int index, int length) Inserts spaces into the middle of a table. | public static short[] | insert(short[] array, int index, int length) Inserts spaces into the middle of a table. | public static byte[] | insert(byte[] array, int index, int length) Inserts spaces into the middle of a table. | public static char[] | insert(char[] array, int index, int length) Inserts spaces into the middle of a table. | public static boolean[] | insert(boolean[] array, int index, int length) Inserts spaces into the middle of a table. | public static Object[] | insert(Object[] src, int src_pos, Object[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static double[] | insert(double[] src, int src_pos, double[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static float[] | insert(float[] src, int src_pos, float[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static long[] | insert(long[] src, int src_pos, long[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static int[] | insert(int[] src, int src_pos, int[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static short[] | insert(short[] src, int src_pos, short[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static byte[] | insert(byte[] src, int src_pos, byte[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static char[] | insert(char[] src, int src_pos, char[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static boolean[] | insert(boolean[] src, int src_pos, boolean[] dst, int dst_pos, int length) Inserts a table slice into another table. | public static boolean | isSorted(char[] array) Returns
true if all elements in the specified array are in increasing order. | public static boolean | isSorted(byte[] array) Returns
true if all elements in the specified array are in increasing order. | public static boolean | isSorted(short[] array) Returns
true if all elements in the specified array are in increasing order. | public static boolean | isSorted(int[] array) Returns
true if all elements in the specified array are in increasing order. | public static boolean | isSorted(long[] array) Returns
true if all elements in the specified array are in increasing order. | public static boolean | isSorted(float[] array) Returns
true if all elements in the specified array are in increasing order.
Since
NaN values are unordered, they may appears anywhere in the array; they
will be ignored. | public static boolean | isSorted(double[] array) Returns
true if all elements in the specified array are in increasing order.
Since
NaN values are unordered, they may appears anywhere in the array; they
will be ignored. | public static boolean | isStrictlySorted(int[] array) Returns
true if all elements in the specified array are in strictly increasing order. | public static Object[] | remove(Object[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab the elements. Parameters: index - array index of the first element to grab.All subsequent array elements can be moved forward. Parameters: length - Number of elements to grab. | public static double[] | remove(double[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static float[] | remove(float[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static long[] | remove(long[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static int[] | remove(int[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static short[] | remove(short[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static byte[] | remove(byte[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static char[] | remove(char[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static boolean[] | remove(boolean[] array, int index, int length) Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. | public static Object[] | resize(Object[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static double[] | resize(double[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static float[] | resize(float[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static long[] | resize(long[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static int[] | resize(int[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static short[] | resize(short[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static byte[] | resize(byte[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static char[] | resize(char[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static boolean[] | resize(boolean[] array, int length) Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. | public static String | toString(Object array, Locale locale) Returns a string representation of an array of numbers. |
hasNaN | public static boolean hasNaN(double[] array)(Code) | | Returns
true if the specified array contains at least one
Double.NaN NaN value.
|
hasNaN | public static boolean hasNaN(float[] array)(Code) | | Returns
true if the specified array contains at least one
Float.NaN NaN value.
|
insert | public static Object[] insert(Object[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of null elements.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static double[] insert(double[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static float[] insert(float[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static long[] insert(long[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static int[] insert(int[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static short[] insert(short[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static byte[] insert(byte[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static char[] insert(char[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of zeros.
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static boolean[] insert(boolean[] array, int index, int length)(Code) | | Inserts spaces into the middle of a table. These "spaces" will be made
up of
false .
Parameters: array - Table in which to insert spaces. Parameters: index - array index where spaces should be inserted.All array elements which have an index equalto or higher than index will be movedforward. Parameters: length - Number of spaces to insert. Table which contains the array data with theadditional space. This method can directly return dst , but most often it returns a newlycreated table. |
insert | public static Object[] insert(Object[] src, int src_pos, Object[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static double[] insert(double[] src, int src_pos, double[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static float[] insert(float[] src, int src_pos, float[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static long[] insert(long[] src, int src_pos, long[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static int[] insert(int[] src, int src_pos, int[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static short[] insert(short[] src, int src_pos, short[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static byte[] insert(byte[] src, int src_pos, byte[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static char[] insert(char[] src, int src_pos, char[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
insert | public static boolean[] insert(boolean[] src, int src_pos, boolean[] dst, int dst_pos, int length)(Code) | | Inserts a table slice into another table. The
src table
will be entirely or partially inserted into the
dst table.
Parameters: src - Tablea to insert into dst . Parameters: src_pos - Index of the first data item of src toinsert into dst . Parameters: dst - Table in which to insert src data. Parameters: dst_pos - dst index in which to insert src data. All elements of dst whose index is equal to or greater than dst_pos will be moved forward. Parameters: length - Number of src data items to insert. Table which contains the combination of src and dst . This method can directly return dst , but never src . It mostoften returns a newly created table. |
isSorted | public static boolean isSorted(char[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
This method is usefull in assertions.
|
isSorted | public static boolean isSorted(byte[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
This method is usefull in assertions.
|
isSorted | public static boolean isSorted(short[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
This method is usefull in assertions.
|
isSorted | public static boolean isSorted(int[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
This method is usefull in assertions.
|
isSorted | public static boolean isSorted(long[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
This method is usefull in assertions.
|
isSorted | public static boolean isSorted(float[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
Since
NaN values are unordered, they may appears anywhere in the array; they
will be ignored. This method is usefull in assertions.
|
isSorted | public static boolean isSorted(double[] array)(Code) | | Returns
true if all elements in the specified array are in increasing order.
Since
NaN values are unordered, they may appears anywhere in the array; they
will be ignored. This method is usefull in assertions.
|
isStrictlySorted | public static boolean isStrictlySorted(int[] array)(Code) | | Returns
true if all elements in the specified array are in strictly increasing order.
This method is usefull in assertions.
|
remove | public static Object[] remove(Object[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab the elements. Parameters: index - array index of the first element to grab.All subsequent array elements can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static double[] remove(double[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static float[] remove(float[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static long[] remove(long[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static int[] remove(int[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static short[] remove(short[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static byte[] remove(byte[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static char[] remove(char[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
remove | public static boolean[] remove(boolean[] array, int index, int length)(Code) | | Grabs elements from the middle of a table.
Parameters: array - Table from which to grab elements. Parameters: index - array index of the first element to grab.All subsequent elements of array can be moved forward. Parameters: length - Number of elements to grab. Table which contains the array data with theextracted elements. This method can directly return dst , but most often it returns a newly createdtable. |
resize | public static Object[] resize(Object[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static double[] resize(double[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static float[] resize(float[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static long[] resize(long[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static int[] resize(int[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static short[] resize(short[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static byte[] resize(byte[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static char[] resize(char[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
resize | public static boolean[] resize(boolean[] array, int length)(Code) | | Returns a new table which contains the same elements as
array but with the
length specified.
If the desired
length is longer than the initial
length of the
array table, the returned table will contain
all the elements of
array as well as the elements
initialised to
null at the end of the table. If, on the
contrary, the desired
length is shorter than the initial
length of the
array table, the table will be truncated
(that is to say the surplus
array elements will be
forgotten). If the length of
array is equal to
length , then
array will be returned as it
stands.
Parameters: array - Table to copy. Parameters: length - Length of the desired table. Table of the same type as array , of length length and containing the data from array . |
toString | public static String toString(Object array, Locale locale)(Code) | | Returns a string representation of an array of numbers. Current implementation
supports only primitive or subclasses of
Number .
Parameters: array - The array to format. Parameters: locale - The locale for formatting. The formatted array.org.geotools.io.LineFormat |
|
|