@Shareable public class MapItemNameDAO extends Object implements ItemNameDAO, ItemDAO, Serializable
ItemNameDAO,
Serialized Form| Constructor and Description |
|---|
MapItemNameDAO(Map<Long,String> items) |
| Modifier and Type | Method and Description |
|---|---|
static MapItemNameDAO |
fromCSVFile(File file)
Read an item list DAO from a file.
|
LongSet |
getItemIds()
Get all known item IDs.
|
String |
getItemName(long item)
Get the name for an item.
|
@Nullable public LongSet getItemIds()
ItemDAOgetItemIds in interface ItemDAO@Nullable public String getItemName(long item)
ItemNameDAOgetItemName in interface ItemNameDAOitem - The item ID.null if the item is unknown or has no name.public static MapItemNameDAO fromCSVFile(File file) throws IOException
file - A file of item IDs, one per line.IOException - if there is an error reading the list of items.