1 package org.inigma.utopia; 2 3 import java.util.regex.Pattern; 4 5 public enum Personality { 6 Merchant("Merchant", "Merc", "^The Wealthy (.*)"), 7 WarHero("War Hero", "Hero", "^The Heroic (.*)"), 8 Rogue("Rogue", "Rogue", "(.*) the Rogue$"), 9 Mystic("Mystic", "Myst", "(.*) (the Sorcerer| the Sorceress)$"), 10 Warrior("Warrior", "War", "(.*) the Warrior$"), 11 Freak("Freak", "Freak", "(.*) the Crazy$"), 12 Shepard("Shepard", "Shep", "^The Humble (.*)"), 13 Sage("Sage", "Sage", "^The Wise (.*)"), 14 Artisan("Artisan", "Art", "(.*) (the Craftsman| theCraftswoman)$"), 15 Unknown("Unknown", "???", "(.*)"); 16 17 private String displayName; 18 private String shortName; 19 private final Pattern pattern; 20 21 private Personality(String name, String shortName, String label) { 22 this.displayName = name; 23 this.shortName = shortName; 24 this.pattern = Pattern.compile(label); 25 } 26 27 public String getDisplayName() { 28 return displayName; 29 } 30 31 public String getShortName() { 32 return shortName; 33 } 34 35 public Pattern getPattern() { 36 return pattern; 37 } 38 }