Interface IItemListModule
- All Known Implementing Classes:
ItemListModule
public interface IItemListModule
Module for ignore/acceptance lists of items.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(ItemStorage item) Add an item to the list.voidClear all in the list.getId()Get the unique id of this module.getList()Get a specific itemlist.Get the string identifier of the list.booleanisItemInList(ItemStorage item) Check if the item is an allowed item.voidremoveItem(ItemStorage item) Remove an item from the list.voidReset to defaults (usually but not necessarily the same asclearItems()).
-
Method Details
-
addItem
Add an item to the list.- Parameters:
item- the item to add.
-
isItemInList
Check if the item is an allowed item.- Parameters:
item- the item to check.- Returns:
- true if so.
-
removeItem
Remove an item from the list.- Parameters:
item- the item to remove.
-
getList
List<ItemStorage> getList()Get a specific itemlist.- Returns:
- a copy of the list at ID, or an empty list.
-
getListIdentifier
String getListIdentifier()Get the string identifier of the list.- Returns:
- the string.
-
clearItems
void clearItems()Clear all in the list. -
resetToDefaults
void resetToDefaults()Reset to defaults (usually but not necessarily the same asclearItems()). -
getId
String getId()Get the unique id of this module.- Returns:
- the id.
-