public class Inventory
extends java.lang.Object
Constructor | Description |
---|---|
Inventory() |
Modifier and Type | Method | Description |
---|---|---|
static java.util.Optional<java.lang.Boolean> |
containsItem(int itemId) |
|
static java.util.Optional<java.lang.Integer> |
countItem(int itemId) |
|
static int |
getCapacity() |
|
static java.util.Optional<java.lang.Integer> |
getFreeSpace() |
|
static java.util.Optional<int[]> |
getItemIds() |
|
static java.util.Optional<int[]> |
getItemQuantities() |
|
static java.util.Optional<java.lang.Integer> |
getUsedSpace() |
|
static java.util.Optional<Widget> |
getWidget() |
public static java.util.Optional<int[]> getItemIds()
public static java.util.Optional<int[]> getItemQuantities()
public static java.util.Optional<java.lang.Boolean> containsItem(int itemId)
itemId
- the item ID of the item to lookuptrue
if the item was successfully found in the inventory;
false
if it was not found;
or nothing if the inventory can't be looked uppublic static java.util.Optional<java.lang.Integer> countItem(int itemId)
itemId
- the item ID of the item to countpublic static java.util.Optional<java.lang.Integer> getUsedSpace()
public static java.util.Optional<java.lang.Integer> getFreeSpace()
public static int getCapacity()
public static java.util.Optional<Widget> getWidget()