mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
Refactor and dd ItemUtils helper methods for item type detection
This commit is contained in:
parent
36605dc56c
commit
7e0cd866dd
17
Java/src/main/java/com/gildedrose/ItemUtils.java
Normal file
17
Java/src/main/java/com/gildedrose/ItemUtils.java
Normal 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");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user