NSMutableArray displayedObjects = new NSMutableArray(numberOfObjectsPerBatch()); if (_displayedObjects == null) { int numberOfObjectsPerBatch = numberOfObjectsPerBatch(); int startIndex = (currentBatchIndex() - 1) * numberOfObjectsPerBatch; int size = (_objectList == null) ? 0 : _objectList.size(); int endIndex = Math.min(startIndex + numberOfObjectsPerBatch, size); for (int i = startIndex; i < endIndex; i++) { displayedObjects.addObject(_objectList.get(i)); } } return displayedObjects; }
NSMutableArray displayedObjects = new NSMutableArray(numberOfObjectsPerBatch()); if (_displayedObjects == null) { int numberOfObjectsPerBatch = numberOfObjectsPerBatch(); int startIndex = (currentBatchIndex() - 1) * numberOfObjectsPerBatch; int size = (_objectList == null) ? 0 : size(); int endIndex = Math.min(startIndex + numberOfObjectsPerBatch, size); for (int i = startIndex; i < endIndex; i++) { displayedObjects.addObject(_objectList.get(i)); } } return displayedObjects; }
  public NSArray displayedObjects() {    NSMutableArray displayedObjects = new NSMutableArray(numberOfObjectsPerBatch());    if (_displayedObjects == null) {      int numberOfObjectsPerBatch = numberOfObjectsPerBatch();      int startIndex = (currentBatchIndex() - 1) * numberOfObjectsPerBatch;      int size = (_objectList == null) ? 0 : _objectList.size();      int endIndex = Math.min(startIndex + numberOfObjectsPerBatch, size);      for (int i = startIndex; i < endIndex; i++) {        displayedObjects.addObject(_objectList.get(i));      }    }    return displayedObjects;  }