[Bleeding] Add iterator() with starting index. Addresses BUKKIT-1246

This commit is contained in:
Celtic Minstrel 2012-03-17 10:37:22 -04:00 committed by EvilSeph
parent c74338d550
commit 3da0557aa0

View File

@ -272,4 +272,13 @@ public interface Inventory extends Iterable<ItemStack> {
public InventoryHolder getHolder(); public InventoryHolder getHolder();
public ListIterator<ItemStack> iterator(); public ListIterator<ItemStack> iterator();
/**
* Returns an iterator starting at the given index. If the index is positive, then the first
* call to next() will return the item at that index; if it is negative, the first call to
* previous will return the item at index (getSize() + index).
* @param index The index.
* @return An iterator.
*/
public ListIterator<ItemStack> iterator(int index);
} }