mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-12 21:15:45 +00:00
Use Java style array decelerations (#362)
This commit is contained in:
parent
81a498b116
commit
954d222aa6
@ -63,7 +63,7 @@ public class ObjectArrayIterator<E> implements ResettableIterator<E> {
|
|||||||
* @throws NullPointerException if {@code array} is {@code null}
|
* @throws NullPointerException if {@code array} is {@code null}
|
||||||
* @throws IndexOutOfBoundsException if the start index is out of bounds
|
* @throws IndexOutOfBoundsException if the start index is out of bounds
|
||||||
*/
|
*/
|
||||||
public ObjectArrayIterator(final E array[], final int start) {
|
public ObjectArrayIterator(final E[] array, final int start) {
|
||||||
this(array, start, array.length);
|
this(array, start, array.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public class ObjectArrayIterator<E> implements ResettableIterator<E> {
|
|||||||
* @throws IllegalArgumentException if end index is before the start
|
* @throws IllegalArgumentException if end index is before the start
|
||||||
* @throws NullPointerException if {@code array} is {@code null}
|
* @throws NullPointerException if {@code array} is {@code null}
|
||||||
*/
|
*/
|
||||||
public ObjectArrayIterator(final E array[], final int start, final int end) {
|
public ObjectArrayIterator(final E[] array, final int start, final int end) {
|
||||||
if (start < 0) {
|
if (start < 0) {
|
||||||
throw new ArrayIndexOutOfBoundsException("Start index must not be less than zero");
|
throw new ArrayIndexOutOfBoundsException("Start index must not be less than zero");
|
||||||
}
|
}
|
||||||
|
@ -621,8 +621,8 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
|
|||||||
threshold = calculateThreshold(newCapacity, loadFactor);
|
threshold = calculateThreshold(newCapacity, loadFactor);
|
||||||
data = new HashEntry[newCapacity];
|
data = new HashEntry[newCapacity];
|
||||||
} else {
|
} else {
|
||||||
final HashEntry<K, V> oldEntries[] = data;
|
final HashEntry<K, V>[] oldEntries = data;
|
||||||
final HashEntry<K, V> newEntries[] = new HashEntry[newCapacity];
|
final HashEntry<K, V>[] newEntries = new HashEntry[newCapacity];
|
||||||
|
|
||||||
modCount++;
|
modCount++;
|
||||||
for (int i = oldCapacity - 1; i >= 0; i--) {
|
for (int i = oldCapacity - 1; i >= 0; i--) {
|
||||||
|
@ -262,7 +262,7 @@ public class ListOrderedSet<E>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T[] toArray(final T a[]) {
|
public <T> T[] toArray(final T[] a) {
|
||||||
return setOrder.toArray(a);
|
return setOrder.toArray(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user