Interface InventoryItem


public interface InventoryItem
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    By default compare item by using there name
     
    int
     
  • Method Details

    • getPocketId

      int getPocketId()
      Returns:
      (int): pocket id, the item is referred to
    • getName

      String getName()
      Returns:
      (String): name of the item, not null
    • compareTo

      default int compareTo(InventoryItem item)
      By default compare item by using there name
      Parameters:
      item - (InventoryItem): other items , not null
      Returns:
      (int): 1, 0, -1 following the comparison result