1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Adjusted javadoc comments.

This commit is contained in:
Sergey Prigogin 2009-10-06 05:45:55 +00:00
parent 8db497abb6
commit dbec91987b

View file

@ -85,7 +85,7 @@ public abstract class ArrayUtil {
if (currentLength < array.length) {
assert array[currentLength] == null;
assert currentLength == 0 || array[currentLength-1] != null;
assert currentLength == 0 || array[currentLength - 1] != null;
array[currentLength]= obj;
return array;
}
@ -99,7 +99,8 @@ public abstract class ArrayUtil {
/**
* Assumes that array contains nulls at the end, only.
* Appends element after the last non-null element.
* If the array is null or not large enough, a larger one is allocated.
* If the array is not large enough, a larger one is allocated.
* Null <code>array</code> is supported for backward compatibility only and only when T is Object.
*/
@SuppressWarnings("unchecked")
static public <T> T[] append(T[] array, T obj) {
@ -418,7 +419,7 @@ public abstract class ArrayUtil {
* The position of the last non-null element in the array must also be known.
*/
public static Object[] removeNullsAfter(Class<?> c, Object[] array, int index) {
final int newLen= index+1;
final int newLen= index + 1;
if (array != null && array.length == newLen)
return array;
@ -472,8 +473,8 @@ public abstract class ArrayUtil {
if (array != null) {
for (int i = 0; i < array.length; i++) {
if (element == array[i]) {
System.arraycopy(array, i+1, array, i, array.length-i-1);
array[array.length-1]= null;
System.arraycopy(array, i + 1, array, i, array.length - i - 1);
array[array.length - 1]= null;
return;
}
}