Class SlotIterator
java.lang.Object
io.github.rysefoxx.inventory.plugin.pagination.SlotIterator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumAn enum that is used to tell the SlotIterator how to place the items. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SlotIterator.Builderbuilder()intint@Nullable SlotIteratorPatternintgetRow()intgetSlot()@NotNull SlotIterator.SlotIteratorTypegetType()boolean
-
Constructor Details
-
SlotIterator
public SlotIterator()
-
-
Method Details
-
builder
-
getPatternBuilder
- Returns:
- the pattern builder.
-
getSlot
@Nonnegative public int getSlot()- Returns:
- the start slot
-
getColumn
@Nonnegative public int getColumn()- Returns:
- the start column
-
getRow
@Nonnegative public int getRow()- Returns:
- the start row
-
getType
- Returns:
- the SlotIteratorType
-
isOverride
public boolean isOverride()- Returns:
- true if items can be overwritten.
-
getEndPosition
public int getEndPosition()- Returns:
- where the last item should be placed.
If the endPosition was set, the
Pagination.setItemsPerPage(int)specification is ignored.
-
getBlackList
@NotNull public @Unmodifiable @NotNull List<Integer> getBlackList() throws UnsupportedOperationException- Returns:
- all slots where no items should be placed.
- Throws:
UnsupportedOperationException- When modifying the returned list.
-
getBlackListInternal
-