Interface InventoryItem
public interface InventoryItem
-
Method Summary
Modifier and TypeMethodDescriptiondefault intcompareTo(InventoryItem item) By default compare item by using there namegetName()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
By default compare item by using there name- Parameters:
item- (InventoryItem): other items , not null- Returns:
- (int): 1, 0, -1 following the comparison result
-