1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.security.auth;
17
18 import java.security.Principal;
19
20 /***
21 * @author someda
22 */
23 public class TgwPrincipal implements Principal {
24
25 protected String name;
26
27 public TgwPrincipal(){
28 }
29
30 public TgwPrincipal(String name){
31 this.name = name;
32 }
33
34 public String getName() {
35 return name;
36 }
37
38 public int hashCode(){
39 return getName().hashCode();
40 }
41
42 public boolean equals(Object o){
43 if(!(o instanceof TgwPrincipal)) return false;
44 TgwPrincipal obj = (TgwPrincipal) o;
45
46 return obj.getName().equals(this.getName());
47 }
48
49 }