mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
[Bleeding] Add iterator() with starting index. Addresses BUKKIT-1246
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
parent
1d06f749fb
commit
35852775ed
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue