|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.util.ArraysX
public class ArraysX
Utilities for handling arrays.
Constructor Summary | |
---|---|
ArraysX()
|
Method Summary | ||
---|---|---|
static
|
asList(T[] ary)
Returns a mutable list. |
|
static
|
asList(T[][] ary)
Returns a two dimensional mutable list. |
|
static java.lang.Object |
clone(java.lang.Object ary)
Deprecated. As of release 6.0.0, replaced with duplicate(Object) . |
|
static java.lang.Object |
concat(java.lang.Object ary,
java.lang.Object ary1)
Concatenates the two specified array. |
|
static
|
concat(T[] ary,
T[] ary1)
Concatenates the two specified generic array. |
|
static java.lang.Object |
duplicate(java.lang.Object ary)
Duplicates the specified array. |
|
static java.lang.Object |
duplicate(java.lang.Object ary,
int jb,
int je)
Duplicates the specified array. |
|
static
|
duplicate(T[] ary)
Duplicates the specified generic array. |
|
static
|
duplicate(T[] ary,
int jb,
int je)
Duplicates the specified generic array. |
|
static java.lang.Object |
resize(java.lang.Object ary,
int size)
Resizes the specified array. |
|
static
|
resize(T[] ary,
int size)
Resizes the specified generic array. |
|
static java.lang.Object |
shrink(java.lang.Object ary,
int jb,
int je)
Shrink the specified array. |
|
static
|
shrink(T[] ary,
int jb,
int je)
Shrink the specified array. |
|
static java.lang.String |
toHexString(byte[] array)
Returns the hex String representation of a byte array without prefix 0x. |
|
static java.lang.String |
toOctalString(byte[] array,
java.lang.String prefix)
Returns the octal String representation of a byte array with optional prefix. |
|
static java.lang.String |
toString(boolean[] array)
Converts an array of boolean to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(byte[] array)
Converts an array of byte to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(char[] array)
Converts an array of char to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(double[] array)
Converts an array of char to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(float[] array)
Converts an array of float to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(int[] array)
Converts an array of int to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(long[] array)
Converts an array of long to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(java.lang.Object[] array)
Converts an array to a readable string (for debugging purpose). |
|
static java.lang.String |
toString(short[] array)
Converts an array of short to a readable string (for debugging purpose). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArraysX()
Method Detail |
---|
public static final java.lang.String toString(java.lang.Object[] array)
public static final java.lang.String toString(int[] array)
public static final java.lang.String toString(long[] array)
public static final java.lang.String toString(short[] array)
public static final java.lang.String toString(byte[] array)
public static final java.lang.String toString(char[] array)
public static final java.lang.String toString(boolean[] array)
public static final java.lang.String toString(float[] array)
public static final java.lang.String toString(double[] array)
public static final java.lang.String toHexString(byte[] array)
array
- the byte arraypublic static final java.lang.String toOctalString(byte[] array, java.lang.String prefix)
array
- the byte arraypublic static final java.lang.Object duplicate(java.lang.Object ary, int jb, int je)
The array could be an array of objects or primitives.
ary
- the arrayjb
- the beginning index (included)je
- the ending index (excluded)
java.lang.IllegalArgumentException
- if ary is not any array
java.lang.IndexOutOfBoundsException
- if out of boundspublic static final <T> T[] duplicate(T[] ary, int jb, int je)
The array could be an array of objects or primitives.
ary
- the arrayjb
- the beginning index (included)je
- the ending index (excluded)
java.lang.IllegalArgumentException
- if ary is not any array
java.lang.IndexOutOfBoundsException
- if out of boundspublic static final java.lang.Object duplicate(java.lang.Object ary)
ary
- the array
java.lang.IllegalArgumentException
- if ary is not any array
java.lang.IndexOutOfBoundsException
- if out of boundspublic static final <T> T[] duplicate(T[] ary)
ary
- the array
java.lang.IllegalArgumentException
- if ary is not any array
java.lang.IndexOutOfBoundsException
- if out of boundspublic static final java.lang.Object concat(java.lang.Object ary, java.lang.Object ary1)
The array could be an array of objects or primitives.
ary
- the arrayary1
- the array
java.lang.IllegalArgumentException
- if ary and ary1 component types are not compatiblepublic static final <T> T[] concat(T[] ary, T[] ary1)
The array could be an array of objects or primitives.
ary
- the arrayary1
- the array
java.lang.IllegalArgumentException
- if ary and ary1 component types are not compatiblepublic static final java.lang.Object shrink(java.lang.Object ary, int jb, int je)
ary
- the arrayjb
- the beginning index (included)je
- the ending index (excluded)
java.lang.IllegalArgumentException
- if ary is not any array
java.lang.IndexOutOfBoundsException
- if out of boundspublic static final <T> T[] shrink(T[] ary, int jb, int je)
ary
- the arrayjb
- the beginning index (included)je
- the ending index (excluded)
java.lang.IllegalArgumentException
- if ary is not any array
java.lang.IndexOutOfBoundsException
- if out of boundspublic static final <T> java.util.List<T> asList(T[] ary)
Never be null.
ary
- the data array
public static final <T> java.util.List<java.util.List<T>> asList(T[][] ary)
Never be null.
ary
- the two dimensional data array
asList(Object[])
public static final java.lang.Object resize(java.lang.Object ary, int size)
shrink(java.lang.Object, int, int)
, but
it can enlarge and it keeps elements from the first.
public static final <T> T[] resize(T[] ary, int size)
public static final java.lang.Object clone(java.lang.Object ary)
duplicate(Object)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |