package electrosphere.game.data.item.type.model;

import electrosphere.game.data.item.type.Item;
import electrosphere.logger.LoggerInterface;

import java.util.List;

public class ItemTypeMap {
    List<Item> items;

    public List<Item> getItems() {
        return items;
    }
    
    public Item getItem(String name){
        Item rVal = null;
        for(Item item : items){
            if(item.getItemId().equals(name)){
                rVal = item;
                break;
            } else if(item.getItemId().equalsIgnoreCase(name)){
                LoggerInterface.loggerEngine.WARNING("Failed to fetch item type data; however, item with different-capitalized name exists! May be a capitalization error!");
            }
        }
        return rVal;
    }
    
}
