Class SlotPos

java.lang.Object
net.tnemc.menu.core.utils.SlotPos

public class SlotPos extends Object
Represents a slot as a position in a grid of slots with rows and columns. The class provides methods for creating a position with row and column values, creating a position from a slot number, retrieving the slot number, as well as getting the row and column values.
Since:
1.5.0.0
Author:
creatorfromhell
  • Constructor Details

    • SlotPos

      public SlotPos(int row, int column)
      Constructs a SlotPos with specified row and column values.
      Parameters:
      row - The row index.
      column - The column index.
    • SlotPos

      public SlotPos(int slot)
      Constructs a SlotPos from a slot number.
      Parameters:
      slot - The slot number.
  • Method Details

    • slot

      public int slot()
      Calculates and returns the slot number based on the current row and column values.
      Returns:
      The slot number.
    • getRow

      public int getRow()
    • getColumn

      public int getColumn()
    • toString

      public String toString()
      Overrides:
      toString in class Object