Package studio.mevera.lotus.api.content
Interface ContentView
- All Known Subinterfaces:
Content
- All Known Implementing Classes:
DefaultContent
public interface ContentView
Read-only view of a menu's buttons.
Use this when code should inspect content but not change it.
-
Method Summary
Modifier and TypeMethodDescription@NotNull Capacitycapacity()Returns the capacity this content was created for.entries()Returns the stored entries as a stream.voidforEach(@NotNull BiConsumer<Slot, Button> consumer) Visits every stored button.Returns the button at the given slot, if one exists.booleanisEmpty()Returns whether no buttons are present.Returns the next empty slot starting fromfrom.intsize()Returns the number of occupied slots.
-
Method Details
-
capacity
Returns the capacity this content was created for. -
get
Returns the button at the given slot, if one exists. -
size
int size()Returns the number of occupied slots. -
isEmpty
boolean isEmpty()Returns whether no buttons are present. -
nextEmpty
Returns the next empty slot starting fromfrom. -
entries
Returns the stored entries as a stream. -
forEach
Visits every stored button.
-