Class Slot.Indexed
java.lang.Object
com.github.stefvanschie.inventoryframework.pane.util.Slot.Indexed
- All Implemented Interfaces:
Slot
- Enclosing interface:
Slot
A class representing a slot based on an index.
- Since:
- 0.10.8
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.stefvanschie.inventoryframework.pane.util.Slot
Slot.Indexed, Slot.XY
-
Method Summary
-
Method Details
-
getX
@Contract(pure=true) public int getX(int length) Gets the x coordinate of this slot. Iflength
is zero, this will throw anIllegalArgumentException
.- Specified by:
getX
in interfaceSlot
- Parameters:
length
- the length of the parent container- Returns:
- the x coordinate of this slot
- Throws:
IllegalArgumentException
- whenlength
is zero
-
getY
@Contract(pure=true) public int getY(int length) Gets the y coordinate of this slot. Iflength
is zero, this will throw anIllegalArgumentException
.- Specified by:
getY
in interfaceSlot
- Parameters:
length
- the length of the parent container- Returns:
- the y coordinate of this slot
- Throws:
IllegalArgumentException
- whenlength
is zero
-
equals
-
hashCode
public int hashCode()
-