sort

open fun sort(names: Array<String>): Boolean

Sorts the inventory by names in the order they are specified

Return

true if sorted, false otherwise

Parameters

names

the item names to sort


open fun sort(ids: Array<Int>): Boolean

Sorts the inventory by ids in the order they are specified

Return

true if sorted, false otherwise

Parameters

ids

the item ids to sort


open fun sort(comparator: Comparator<InventoryItem>): Boolean

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