java.lang.Object
com.github.stefvanschie.inventoryframework.pane.util.Slot.Indexed
All Implemented Interfaces:
Slot
Enclosing interface:
Slot

public static class Slot.Indexed extends Object implements Slot
A class representing a slot based on an index.
Since:
0.10.8
  • Method Details

    • getX

      @Contract(pure=true) public int getX(int length)
      Gets the x coordinate of this slot. If length is zero, this will throw an IllegalArgumentException.
      Specified by:
      getX in interface Slot
      Parameters:
      length - the length of the parent container
      Returns:
      the x coordinate of this slot
      Throws:
      IllegalArgumentException - when length is zero
    • getY

      @Contract(pure=true) public int getY(int length)
      Gets the y coordinate of this slot. If length is zero, this will throw an IllegalArgumentException.
      Specified by:
      getY in interface Slot
      Parameters:
      length - the length of the parent container
      Returns:
      the y coordinate of this slot
      Throws:
      IllegalArgumentException - when length is zero
    • equals

      public boolean equals(@Nullable @Nullable Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object