1 17 package org.apache.geronimo.security.realm.providers; 18 19 import java.io.Serializable ; 20 import java.security.Principal ; 21 22 29 public class GeronimoUserPrincipal implements Principal , Serializable , GeronimoCallerPrincipal { 30 private final String name; 31 32 public GeronimoUserPrincipal(String name) { 33 this.name = name; 34 } 35 36 41 public boolean equals(Object another) { 42 if (!(another instanceof GeronimoUserPrincipal)) return false; 43 44 return ((GeronimoUserPrincipal) another).name.equals(name); 45 } 46 47 50 public String toString() { 51 return name; 52 } 53 54 57 public int hashCode() { 58 return name.hashCode(); 59 } 60 61 64 public String getName() { 65 return name; 66 } 67 } 68 | Popular Tags |