1
2
3
4
5 package spellcast.ui;
6
7
8 /***
9 * A helper class for container wizard name and gender together
10 * to form a profile.
11 *
12 * @author Barrie Treloar
13 */
14 public class WizardProfile
15 {
16 public String wizardName;
17 public String gender;
18
19 public WizardProfile( String wizardName, String gender )
20 {
21 this.wizardName = wizardName;
22 this.gender = gender;
23 }
24
25 public String toString()
26 {
27 return wizardName;
28 }
29
30 public boolean equals( Object o )
31 {
32 boolean result = false;
33
34 if ( o instanceof WizardProfile )
35 {
36 WizardProfile other = (WizardProfile)o;
37 if ( wizardName.equals( other.wizardName ) &&
38 gender.equals( other.gender ) )
39 {
40 result = true;
41 }
42 }
43
44 return result;
45 }
46
47 }
48