public final class Role extends TreeObject<Role> implements NamedObject
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Role... roles)
Adds given roles as children of this object
|
void |
addChild(String... roleNames)
Adds given roles as children of this object.
|
boolean |
equals(Object obj) |
String |
getName() |
int |
hashCode() |
String |
toString() |
addChild, belongsTo, belongsTo, clearChildren, getChildren, hasChild, hasChildren, hasChildren, removeChildpublic final void addChild(Role... roles) throws IllegalArgumentException, DuplicateException
roles - roles to be addedIllegalArgumentException - if roles.length == 0 or any given role is nullDuplicateException - if any of given roles was already added as a child (direct of indirect) of this instancepublic final void addChild(String... roleNames) throws DuplicateException, IllegalArgumentException, RoleNotFoundException
roleNames - name of the roles used to obtain instancesIllegalArgumentException - if roleNames.length == 0 or any of given roleNames is null/emptyRoleNotFoundException - if given role is not registered in RoleRepositoryDuplicateException - if any of given roles was already added as a child (direct of indirect) of this instancepublic String getName()
getName in interface NamedObjectpublic int hashCode()
hashCode in class TreeObject<Role>public boolean equals(Object obj)
equals in class TreeObject<Role>Copyright © 2015 Agapsys Tecnologia Ltda-ME. All rights reserved.