|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.utility.ArrayUtils
public class ArrayUtils
Handy methods for resizing arrays, and other handy array methods This is a fresh implementation of the capacity methods, without the use of any prelicensed code.
| Constructor Summary | |
|---|---|
ArrayUtils()
|
|
| Method Summary | |
|---|---|
static byte[] |
ensureCapacity(byte[] array,
int length)
Grow an array to ensure it is the desired length. |
static byte[] |
ensureCapacity(byte[] array,
int length,
int preserve)
Grow an array to ensure it is the desired length. |
static byte[] |
grow(byte[] array,
int length)
Grow an array to ensure it is at least the desired length. |
static byte[] |
grow(byte[] array,
int length,
int preserve)
Grow an array to ensure it is at least the desired length. |
static java.lang.String |
join(java.lang.String[] in,
java.lang.String join)
Join some strings together. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayUtils()
| Method Detail |
|---|
public static byte[] ensureCapacity(byte[] array,
int length)
array - input arraylength - ensure array is this length
public static byte[] ensureCapacity(byte[] array,
int length,
int preserve)
array - input arraylength - new desired lengthpreserve - amount of old array to copy to new array in case of reallocation
public static byte[] grow(byte[] array,
int length)
array - input arraylength - minimuim length of new array
public static byte[] grow(byte[] array,
int length,
int preserve)
array - input arraylength - minimuim length of new array
public static java.lang.String join(java.lang.String[] in,
java.lang.String join)
in - Strings to joinjoin - Character or String to join by
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||