test_class.file: runelite-client/src/test/java/net/runelite/client/plugins/loottracker/LootTrackerBoxTest.java
test_class.identifier: LootTrackerBoxTest
test_case.body: @Test
  	public void testAddKill()
  	{
  		LootTrackerBox lootTrackerBox = new LootTrackerBox(
  			mock(ItemManager.class),
  			"Theatre of Blood",
  			LootRecordType.EVENT,
  			null,
  			false,
  			LootTrackerPriceType.GRAND_EXCHANGE,
  			false,
  			null, null,
  			false);
  
  		LootTrackerItem[] items = new LootTrackerItem[]{
  			new LootTrackerItem(ItemID.CLUE_SCROLL_MEDIUM, "Clue scroll (medium)", 1, 0, 0, false),
  			new LootTrackerItem(ItemID.CLUE_SCROLL_MEDIUM_3602, "Clue scroll (medium)", 1, 0, 0, false),
  			new LootTrackerItem(ItemID.GRACEFUL_HOOD_13579, "Graceful hood", 1, 0, 0, false),
  		};
  		LootTrackerRecord lootTrackerRecord = new LootTrackerRecord(
  			"Theatre of Blood",
  			null,
  			LootRecordType.EVENT,
  			items,
  			42
  		);
  
  		lootTrackerBox.addKill(lootTrackerRecord);
  
  		assertEquals(Arrays.asList(
  			new LootTrackerItem(ItemID.CLUE_SCROLL_MEDIUM, "Clue scroll (medium)", 2, 0, 0, false),
  			new LootTrackerItem(ItemID.GRACEFUL_HOOD_13579, "Graceful hood", 1, 0, 0, false)
  		), lootTrackerBox.getItems());
  	}
test_case.class_method_signature: LootTrackerBoxTest.testAddKill()
test_case.full_signature: @Test public void testAddKill()
test_case.identifier: testAddKill
test_case.invocations: mock addKill assertEquals asList getItems
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddKill()
focal_class.declarator: ITEMS_PER_ROW = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int ITEMS_PER_ROW = 5;
focal_class.type: int
focal_class.var_name: ITEMS_PER_ROW
focal_class.declarator: TITLE_PADDING = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int TITLE_PADDING = 5;
focal_class.type: int
focal_class.var_name: TITLE_PADDING
focal_class.declarator: itemContainer = new JPanel()
focal_class.modifier: private final
focal_class.original_string: private final JPanel itemContainer = new JPanel();
focal_class.type: JPanel
focal_class.var_name: itemContainer
focal_class.declarator: priceLabel = new JLabel()
focal_class.modifier: private final
focal_class.original_string: private final JLabel priceLabel = new JLabel();
focal_class.type: JLabel
focal_class.var_name: priceLabel
focal_class.declarator: subTitleLabel = new JLabel()
focal_class.modifier: private final
focal_class.original_string: private final JLabel subTitleLabel = new JLabel();
focal_class.type: JLabel
focal_class.var_name: subTitleLabel
focal_class.declarator: logTitle = new JPanel()
focal_class.modifier: private final
focal_class.original_string: private final JPanel logTitle = new JPanel();
focal_class.type: JPanel
focal_class.var_name: logTitle
focal_class.declarator: itemManager
focal_class.modifier: private final
focal_class.original_string: private final ItemManager itemManager;
focal_class.type: ItemManager
focal_class.var_name: itemManager
focal_class.declarator: id
focal_class.modifier: @Getter(AccessLevel.PACKAGE)
  	private final
focal_class.original_string: @Getter(AccessLevel.PACKAGE)
  	private final String id;
focal_class.type: String
focal_class.var_name: id
focal_class.declarator: lootRecordType
focal_class.modifier: private final
focal_class.original_string: private final LootRecordType lootRecordType;
focal_class.type: LootRecordType
focal_class.var_name: lootRecordType
focal_class.declarator: priceType
focal_class.modifier: private final
focal_class.original_string: private final LootTrackerPriceType priceType;
focal_class.type: LootTrackerPriceType
focal_class.var_name: priceType
focal_class.declarator: showPriceType
focal_class.modifier: private final
focal_class.original_string: private final boolean showPriceType;
focal_class.type: boolean
focal_class.var_name: showPriceType
focal_class.declarator: kills
focal_class.modifier: private
focal_class.original_string: private int kills;
focal_class.type: int
focal_class.var_name: kills
focal_class.declarator: items = new ArrayList<>()
focal_class.modifier: @Getter
  	private final
focal_class.original_string: @Getter
  	private final List<LootTrackerItem> items = new ArrayList<>();
focal_class.type: List<LootTrackerItem>
focal_class.var_name: items
focal_class.declarator: totalPrice
focal_class.modifier: private
focal_class.original_string: private long totalPrice;
focal_class.type: long
focal_class.var_name: totalPrice
focal_class.declarator: hideIgnoredItems
focal_class.modifier: private
focal_class.original_string: private boolean hideIgnoredItems;
focal_class.type: boolean
focal_class.var_name: hideIgnoredItems
focal_class.declarator: onItemToggle
focal_class.modifier: private
focal_class.original_string: private BiConsumer<String, Boolean> onItemToggle;
focal_class.type: BiConsumer<String, Boolean>
focal_class.var_name: onItemToggle
focal_class.file: runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java
focal_class.identifier: LootTrackerBox
focal_class.class_method_signature: LootTrackerBox.LootTrackerBox(
  		final ItemManager itemManager,
  		final String id,
  		final LootRecordType lootRecordType,
  		@Nullable final String subtitle,
  		final boolean hideIgnoredItems,
  		final LootTrackerPriceType priceType,
  		final boolean showPriceType,
  		final BiConsumer<String, Boolean> onItemToggle,
  		final BiConsumer<String, Boolean> onEventToggle,
  		final boolean eventIgnored)
focal_class.full_signature:   LootTrackerBox(
  		final ItemManager itemManager,
  		final String id,
  		final LootRecordType lootRecordType,
  		@Nullable final String subtitle,
  		final boolean hideIgnoredItems,
  		final LootTrackerPriceType priceType,
  		final boolean showPriceType,
  		final BiConsumer<String, Boolean> onItemToggle,
  		final BiConsumer<String, Boolean> onEventToggle,
  		final boolean eventIgnored)
focal_class.identifier: LootTrackerBox
focal_class.parameters: (
  		final ItemManager itemManager,
  		final String id,
  		final LootRecordType lootRecordType,
  		@Nullable final String subtitle,
  		final boolean hideIgnoredItems,
  		final LootTrackerPriceType priceType,
  		final boolean showPriceType,
  		final BiConsumer<String, Boolean> onItemToggle,
  		final BiConsumer<String, Boolean> onEventToggle,
  		final boolean eventIgnored)
focal_class.signature:  LootTrackerBox(
  		final ItemManager itemManager,
  		final String id,
  		final LootRecordType lootRecordType,
  		@Nullable final String subtitle,
  		final boolean hideIgnoredItems,
  		final LootTrackerPriceType priceType,
  		final boolean showPriceType,
  		final BiConsumer<String, Boolean> onItemToggle,
  		final BiConsumer<String, Boolean> onEventToggle,
  		final boolean eventIgnored)
focal_class.class_method_signature: LootTrackerBox.getTotalKills()
focal_class.full_signature: private int getTotalKills()
focal_class.identifier: getTotalKills
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTotalKills()
focal_class.class_method_signature: LootTrackerBox.matches(final LootTrackerRecord record)
focal_class.full_signature:  boolean matches(final LootTrackerRecord record)
focal_class.identifier: matches
focal_class.parameters: (final LootTrackerRecord record)
focal_class.return: boolean
focal_class.signature: boolean matches(final LootTrackerRecord record)
focal_class.class_method_signature: LootTrackerBox.matches(final String id, final LootRecordType type)
focal_class.full_signature:  boolean matches(final String id, final LootRecordType type)
focal_class.identifier: matches
focal_class.parameters: (final String id, final LootRecordType type)
focal_class.return: boolean
focal_class.signature: boolean matches(final String id, final LootRecordType type)
focal_class.class_method_signature: LootTrackerBox.addKill(final LootTrackerRecord record)
focal_class.full_signature:  void addKill(final LootTrackerRecord record)
focal_class.identifier: addKill
focal_class.parameters: (final LootTrackerRecord record)
focal_class.return: void
focal_class.signature: void addKill(final LootTrackerRecord record)
focal_class.class_method_signature: LootTrackerBox.rebuild()
focal_class.full_signature:  void rebuild()
focal_class.identifier: rebuild
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rebuild()
focal_class.class_method_signature: LootTrackerBox.collapse()
focal_class.full_signature:  void collapse()
focal_class.identifier: collapse
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void collapse()
focal_class.class_method_signature: LootTrackerBox.expand()
focal_class.full_signature:  void expand()
focal_class.identifier: expand
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void expand()
focal_class.class_method_signature: LootTrackerBox.isCollapsed()
focal_class.full_signature:  boolean isCollapsed()
focal_class.identifier: isCollapsed
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCollapsed()
focal_class.class_method_signature: LootTrackerBox.applyDimmer(boolean brighten, JPanel panel)
focal_class.full_signature: private void applyDimmer(boolean brighten, JPanel panel)
focal_class.identifier: applyDimmer
focal_class.modifiers: private
focal_class.parameters: (boolean brighten, JPanel panel)
focal_class.return: void
focal_class.signature: void applyDimmer(boolean brighten, JPanel panel)
focal_class.class_method_signature: LootTrackerBox.buildItems()
focal_class.full_signature: private void buildItems()
focal_class.identifier: buildItems
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void buildItems()
focal_class.class_method_signature: LootTrackerBox.buildToolTip(LootTrackerItem item)
focal_class.full_signature: private static String buildToolTip(LootTrackerItem item)
focal_class.identifier: buildToolTip
focal_class.modifiers: private static
focal_class.parameters: (LootTrackerItem item)
focal_class.return: String
focal_class.signature: String buildToolTip(LootTrackerItem item)
focal_class.superclass: extends JPanel
focal_method.body: void addKill(final LootTrackerRecord record)
  	{
  		if (!matches(record))
  		{
  			throw new IllegalArgumentException(record.toString());
  		}
  
  		kills += record.getKills();
  
  		outer:
  		for (LootTrackerItem item : record.getItems())
  		{
  			final int mappedItemId = LootTrackerMapping.map(item.getId(), item.getName());
  			// Combine it into an existing item if one already exists
  			for (int idx = 0; idx < items.size(); ++idx)
  			{
  				LootTrackerItem i = items.get(idx);
  				if (mappedItemId == i.getId())
  				{
  					items.set(idx, new LootTrackerItem(i.getId(), i.getName(), i.getQuantity() + item.getQuantity(), i.getGePrice(), i.getHaPrice(), i.isIgnored()));
  					continue outer;
  				}
  			}
  
  			final LootTrackerItem mappedItem = mappedItemId == item.getId()
  				? item // reuse existing item
  				: new LootTrackerItem(mappedItemId, item.getName(), item.getQuantity(), item.getGePrice(), item.getHaPrice(), item.isIgnored());
  			items.add(mappedItem);
  		}
  	}
focal_method.class_method_signature: LootTrackerBox.addKill(final LootTrackerRecord record)
focal_method.full_signature:  void addKill(final LootTrackerRecord record)
focal_method.identifier: addKill
focal_method.invocations: matches toString getKills getItems map getId getName size get getId set getId getName getQuantity getQuantity getGePrice getHaPrice isIgnored getId getName getQuantity getGePrice getHaPrice isIgnored add
focal_method.parameters: (final LootTrackerRecord record)
focal_method.return: void
focal_method.signature: void addKill(final LootTrackerRecord record)