java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.internal.layout.ResolvedLayout

@Internal public final class ResolvedLayout extends Object
Parsed form of ViewConfig.layout(): maps each named layout character to its container slots in row-major order; ' ' marks an unnamed position and is skipped.
  • Method Details

    • resolve

      @NotNull public static @NotNull ResolvedLayout resolve(@NotNull @NotNull ViewConfig config)
      Parses the layout rows of the given config; layout shape was already validated at build time.
      Parameters:
      config - the effective view config
      Returns:
      the resolved layout; an empty mapping when config.layout() is empty
    • rows

      public int rows()
      Returns:
      the layout row count, or the config's resolved rows when no layout was declared
    • hasChar

      public boolean hasChar(char c)
      Parameters:
      c - the layout character to test
      Returns:
      true when the character names at least one slot
    • slotsOf

      @NotNull public @org.jetbrains.annotations.NotNull int[] slotsOf(char c)
      Parameters:
      c - the layout character to look up
      Returns:
      the character's slots in row-major order; an empty array when absent