Refactor and dd ItemUtils helper methods for item type detection

This commit is contained in:
Yossri Ghabri 2025-11-25 15:58:18 +01:00
parent 36605dc56c
commit 7e0cd866dd

View File

@ -0,0 +1,17 @@
package com.gildedrose;
class ItemUtils {
static boolean isAgedBrie(Item item) {
return item.name.equals("Aged Brie");
}
static boolean isBackstage(Item item) {
return item.name.equals("Backstage passes to a TAFKAL80ETC concert");
}
static boolean isSulfuras(Item item) {
return item.name.equals("Sulfuras, Hand of Ragnaros");
}
}