1 9 package org.jboss.portal.core.security; 10 11 17 public final class PermissionDescription 18 { 19 20 21 private final String name; 22 23 24 private final String description; 25 26 public PermissionDescription(String name, String description) 27 { 28 if (name == null) 29 { 30 throw new IllegalArgumentException (); 31 } 32 if (description == null) 33 { 34 throw new IllegalArgumentException (); 35 } 36 this.name = name; 37 this.description = description; 38 } 39 40 public String getName() 41 { 42 return name; 43 } 44 45 public String getDescription() 46 { 47 return description; 48 } 49 50 public boolean equals(Object obj) 51 { 52 if (obj == this) 53 { 54 return true; 55 } 56 if (obj instanceof PermissionDescription) 57 { 58 PermissionDescription other = (PermissionDescription)obj; 59 return other.name.equals(name); 60 } 61 return false; 62 } 63 64 public int hashCode() 65 { 66 return name.hashCode(); 67 } 68 } 69 | Popular Tags |