1 26 package org.objectweb.util.browser.core.common; 27 28 import org.objectweb.util.browser.core.api.Role; 29 30 37 public class DefaultRole 38 implements Role { 39 40 41 protected String role_id_; 42 43 44 protected boolean isConcrete_ = true; 45 46 50 public DefaultRole(String role_id){ 51 role_id_ = role_id; 52 } 53 54 57 public String getId() { 58 return role_id_; 59 } 60 61 64 public void setConcrete(boolean isConcrete){ 65 isConcrete_ = isConcrete; 66 } 67 68 71 public boolean isConcrete(){ 72 return isConcrete_; 73 } 74 75 public boolean equals(Object obj){ 76 if(obj!=null){ 77 return ((DefaultRole)obj).getId().trim().equals(role_id_.trim()); 78 } 79 return false; 80 } 81 82 public String toString(){ 83 return "DefaultRole[id=" + this.getId() + "]"; 84 } 85 } 86 | Popular Tags |