|
|
@@ -187,6 +187,9 @@ public class ArrayLookup<K> extends ALookup<K> implements BlockMap<K,Integer> {
|
|
|
if(n > capacity()) {
|
|
|
return false;
|
|
|
}
|
|
|
+ if(n<size) {
|
|
|
+ throw new IllegalArgumentException(String.format("n= %d is too small (size=%d)", n, size));
|
|
|
+ }
|
|
|
this.keys = ArrayUtils.slice(keys, 0, n);
|
|
|
this.vars = ArrayUtils.slice(vars, 0, n);
|
|
|
return true;
|