Class Bag
java.lang.Object
com.deco2800.game.components.player.Bag
- All Implemented Interfaces:
BagInterface
public class Bag extends java.lang.Object implements BagInterface
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classBag.BagIterator -
Field Summary
-
Constructor Summary
Constructors Constructor Description Bag() -
Method Summary
-
Constructor Details
-
Bag
public Bag()
-
-
Method Details
-
iterator
Description copied from interface:BagInterface背包迭代器- Specified by:
iteratorin interfaceBagInterface- Returns:
- 背包迭代器,用于访问背包中每个项
-
add
Description copied from interface:BagInterface添加物品- Specified by:
addin interfaceBagInterface- Parameters:
e- 物品
-
remove
Description copied from interface:BagInterface移除装备- Specified by:
removein interfaceBagInterface- Parameters:
e- 物品
-
move
Description copied from interface:BagInterface物品交换位置- Specified by:
movein interfaceBagInterface- Parameters:
e1- 物品1e2- 物品2
-