Interface SlotMask

All Known Implementing Classes:
SlotMask.Custom, SlotMask.Excluding, SlotMask.Full, SlotMask.Range

public sealed interface SlotMask permits SlotMask.Full, SlotMask.Range, SlotMask.Custom, SlotMask.Excluding
Declarative description of which slots are usable within a Capacity.

Replaces the legacy FillRange: instead of "start + end + forbidden", a mask is a sealed algebra of composable shapes whose count is always derived, never mutated.

  • Method Details

    • capacity

      @NotNull @NotNull Capacity capacity()
    • contains

      boolean contains(@NotNull @NotNull Slot slot)
    • size

      int size()
    • stream

      @NotNull @NotNull Stream<Slot> stream()
    • excluding

      @NotNull default @NotNull SlotMask excluding(@NotNull @NotNull Slot... slots)
    • excluding

      @NotNull default @NotNull SlotMask excluding(@NotNull @NotNull Set<Slot> slots)
    • full

      @NotNull static @NotNull SlotMask full(@NotNull @NotNull Capacity capacity)
    • range

      @NotNull static @NotNull SlotMask range(@NotNull @NotNull Capacity capacity, @NotNull @NotNull Slot from, @NotNull @NotNull Slot to)
    • of

      @NotNull static @NotNull SlotMask of(@NotNull @NotNull Capacity capacity, @NotNull @NotNull Set<Slot> slots)