sort

static boolean sort(Array<String> names)

Sorts the inventory by names in the order they are specified

Return

true if sorted, false otherwise

Parameters

names

the item names to sort

static boolean sort(Array<int> ids)

Sorts the inventory by ids in the order they are specified

Return

true if sorted, false otherwise

Parameters

ids

the item ids to sort

static boolean sort(Comparator<InventoryItem> comparator)

Sorts the inventory by the specified comparator

Return

true if sorted successfully, false otherwise (timed out or too many attempts)

Parameters

comparator

the comparator to sort the inventory