protected final void accumulateStats(ConsumedCapacity consumedCapacity,
            Integer count, Integer scannedCount) {
        if (consumedCapacity != null) {
            if (accumulatedConsumedCapacity == null) {
                // Create a new consumed capacity by cloning the one passed in
                this.accumulatedConsumedCapacity = new ConsumedCapacity();
                accumulatedConsumedCapacity.setCapacityUnits(consumedCapacity.getCapacityUnits());
                accumulatedConsumedCapacity.setGlobalSecondaryIndexes(
                    clone(consumedCapacity.getGlobalSecondaryIndexes()));
                accumulatedConsumedCapacity.setLocalSecondaryIndexes(
                    clone(consumedCapacity.getLocalSecondaryIndexes()));
                accumulatedConsumedCapacity.setTable(clone(consumedCapacity.getTable()));
                accumulatedConsumedCapacity.setTableName(consumedCapacity.getTableName());
            } else {
                // Accumulate the capacity units
                final Double capunit = accumulatedConsumedCapacity.getCapacityUnits();
                final Double delta = consumedCapacity.getCapacityUnits();
                if (capunit == null) {
                    accumulatedConsumedCapacity.setCapacityUnits(delta);
                } else {
                    accumulatedConsumedCapacity.setCapacityUnits(capunit.doubleValue()
                        + (delta == null ? 0 : delta.doubleValue()));
                }
                // Accumulate the GSI capacities
                final Map<String, Capacity> gsi = accumulatedConsumedCapacity.getGlobalSecondaryIndexes();
                if (gsi == null) {
                    accumulatedConsumedCapacity.setGlobalSecondaryIndexes(
                        clone(consumedCapacity.getGlobalSecondaryIndexes()));
                } else {
                    accumulatedConsumedCapacity.setGlobalSecondaryIndexes(add(
                        consumedCapacity.getGlobalSecondaryIndexes(),
                        accumulatedConsumedCapacity.getGlobalSecondaryIndexes()));
                }
                // Accumulate the LSI capacities
                final Map<String, Capacity> lsi = accumulatedConsumedCapacity.getLocalSecondaryIndexes();
                if (lsi == null) {
                    accumulatedConsumedCapacity.setLocalSecondaryIndexes(
                        clone(consumedCapacity.getLocalSecondaryIndexes()));
                } else {
                    accumulatedConsumedCapacity.setLocalSecondaryIndexes(add(
                        consumedCapacity.getLocalSecondaryIndexes(),
                        accumulatedConsumedCapacity.getLocalSecondaryIndexes()));
                }
                // Accumulate table capacity
                final Capacity tableCapacity = accumulatedConsumedCapacity.getTable();
                if (tableCapacity == null) {
                    accumulatedConsumedCapacity.setTable(clone(consumedCapacity.getTable()));
                } else {
                    accumulatedConsumedCapacity.setTable(add(consumedCapacity.getTable(),
                            accumulatedConsumedCapacity.getTable()));
                }
            }
        }
        if (count != null) {
            this.accumulatedItemCount += count.intValue();
        }
        if (scannedCount != null) {
            this.accumulatedScannedCount += scannedCount.intValue();
        }
    }
A collection of <code>Item</code>'s.

An <code>ItemCollection</code> object maintains a cursor pointing to its
current pages of data. Initially the cursor is positioned before the first page.
The next method moves the cursor to the next row, and because it returns
false when there are no more rows in the <code>ItemCollection</code> object,
it can be used in a while loop to iterate through the collection.

Network calls can be triggered when the collection is iterated across page
boundaries.

@param <R> low level result type
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/ItemCollection.java