summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorCeltic Minstrel <celtic.minstrel.ca@some.place>2012-03-17 10:37:22 -0400
committerEvilSeph <evilseph@gmail.com>2012-03-20 19:49:39 -0400
commit3da0557aa01653b53870a119c138eeef4f18021b (patch)
tree4b7eed91c2af58cecc3b918fc7c7eebb2298353b /src/main
parentc74338d550b781931b0599046e349dbe36e0b3a6 (diff)
downloadbukkit-3da0557aa01653b53870a119c138eeef4f18021b.tar
bukkit-3da0557aa01653b53870a119c138eeef4f18021b.tar.gz
bukkit-3da0557aa01653b53870a119c138eeef4f18021b.tar.lz
bukkit-3da0557aa01653b53870a119c138eeef4f18021b.tar.xz
bukkit-3da0557aa01653b53870a119c138eeef4f18021b.zip
[Bleeding] Add iterator() with starting index. Addresses BUKKIT-1246
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/inventory/Inventory.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java
index c5dc995c..6016b1f6 100644
--- a/src/main/java/org/bukkit/inventory/Inventory.java
+++ b/src/main/java/org/bukkit/inventory/Inventory.java
@@ -272,4 +272,13 @@ public interface Inventory extends Iterable<ItemStack> {
public InventoryHolder getHolder();
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);
}