mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 17:21:38 +00:00
24 lines
510 B
Java
24 lines
510 B
Java
package com.gildedrose.rule;
|
|
|
|
public enum Goods {
|
|
AGED_BRIE("Aged Brie"),
|
|
BACKSTAGE("Backstage passes to a TAFKAL80ETC concert"),
|
|
SULFURAS("Sulfuras, Hand of Ragnaros"),
|
|
CONJURED("Conjured");
|
|
|
|
public final String label;
|
|
|
|
Goods(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public static Goods valueOfLabel(String label) {
|
|
for (Goods e : values()) {
|
|
if (e.label.equals(label)) {
|
|
return e;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|