This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119,123c119,120 | |
< ArrayList<Integer> ids=new ArrayList<Integer>(size()); | |
< for(int i=0;i<size();i++) { | |
< ids.add(i); | |
< } | |
< return ids; | |
--- | |
> | |
> return new NaturalNumbersList(size()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133c133,134 | |
< return definition.getBatchSize(); | |
--- | |
> // the batch size must not exceed maxCacheSize | |
> return Math.min(maxCacheSize, definition.getBatchSize()); | |
143c144,146 | |
< if(!itemCache.containsKey(index - addedItemCount)) { | |
--- | |
> int cacheIndex = index - addedItemCount; | |
> Integer cacheIndexObject = Integer.valueOf(cacheIndex); |