|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.util.ExtArrays
Various often used array functions
Field Summary | |
static Class[] |
emptyClassArray
|
static Interceptor[] |
emptyInterceptorArray
|
static Object[] |
emptyObjectArray
|
static String[] |
emptyStringArray
|
Constructor Summary | |
ExtArrays()
|
Method Summary | |
static Object[] |
add(int position,
Object toInsert,
Object[] array)
Insert an object into an array |
static Object[] |
add(int position,
Object toInsert,
Object[] array,
Class type)
Insert an object into an array |
static Object[] |
add(Object toAppend,
Object[] array)
Append an object at the end of an array |
static Object[] |
add(Object toAppend,
Object[] array,
Class type)
Append an object at the end of an array |
static List |
asList(byte[] array)
Builds a List out of an array of bytes |
static boolean |
contains(Object[] array,
Object value)
Tells wether an array of objects contains a given value |
static boolean |
equals(byte[] a,
int offseta,
byte[] b,
int offsetb,
int length)
Tests equality of some elements of two arrays of bytes. |
static int |
indexOf(Object[] array,
Object value)
Returns the index of a value in an array of Object. |
static Object |
subArray(Object[] array,
int start)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object[] emptyObjectArray
public static final String[] emptyStringArray
public static final Class[] emptyClassArray
public static final Interceptor[] emptyInterceptorArray
Constructor Detail |
public ExtArrays()
Method Detail |
public static Object[] add(int position, Object toInsert, Object[] array)
position
- of the object to insert (>=0 and <=array.length)toInsert
- the object to insertarray
- the array
array
,
or the type of toInsert
, or Object[].add(int,Object,Object[],Class)
,
add(Object,Object[])
public static Object[] add(int position, Object toInsert, Object[] array, Class type)
position
- of the object to insert (>=0 and <=array.length)toInsert
- the object to insertarray
- the arraytype
- component type of the array to return
add(int,Object,Object[])
public static Object[] add(Object toAppend, Object[] array)
toAppend
- the object to addarray
- the array
add(int,Object,Object[],Class)
,
add(Object,Object[],Class)
public static Object[] add(Object toAppend, Object[] array, Class type)
toAppend
- the object to addarray
- the arraytype
- component type of the array to return
add(Object,Object[])
,
add(int,Object,Object[])
public static int indexOf(Object[] array, Object value)
array
- the arrayvalue
- the searched value
public static boolean contains(Object[] array, Object value)
array
- the array to search the value invalue
- the object to search for
public static boolean equals(byte[] a, int offseta, byte[] b, int offsetb, int length)
a
- first array of bytesoffseta
- start comparison in first array with this offsetb
- second arrayoffsetb
- start comparison in second array with this offsetlength
- number of bytes to comparepublic static List asList(byte[] array)
public static Object subArray(Object[] array, int start)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |