Explicit boxing
This documents that the boxing is actually intended, rather than an error due to the accidental use of the wrong type. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1476781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
842e39bef6
commit
ce86f3f8aa
|
@ -84,7 +84,7 @@ public class PermutationIterator<E> implements Iterator<List<E>> {
|
|||
int value = 1;
|
||||
objectMap = new HashMap<Integer, E>();
|
||||
for (E e : coll) {
|
||||
objectMap.put(value, e);
|
||||
objectMap.put(Integer.valueOf(value), e);
|
||||
keys[value - 1] = value;
|
||||
value++;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ public class PermutationIterator<E> implements Iterator<List<E>> {
|
|||
if (keys[i] > largestKey) {
|
||||
direction[i] = !direction[i];
|
||||
}
|
||||
nextP.add(objectMap.get(keys[i]));
|
||||
nextP.add(objectMap.get(Integer.valueOf(keys[i])));
|
||||
}
|
||||
final List<E> result = nextPermutation;
|
||||
nextPermutation = nextP;
|
||||
|
|
|
@ -256,7 +256,7 @@ public class CircularFifoQueue<E> extends AbstractCollection<E>
|
|||
if (index < 0 || index >= sz) {
|
||||
throw new NoSuchElementException(
|
||||
String.format("The specified index (%1$d) is outside the available range [0, %2$d)",
|
||||
index, sz));
|
||||
Integer.valueOf(index), Integer.valueOf(sz)));
|
||||
}
|
||||
|
||||
final int idx = (start + index) % maxElements;
|
||||
|
|
Loading…
Reference in New Issue