|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yosokumo.core.Roster
public class Roster
For each study, a list of users that have a role on the study. A roster has these attributes:
Method Summary | |
---|---|
boolean |
containsRole(java.lang.String userIdentifier)
Test if a role is in the roster. |
Role |
getRole(java.lang.String userIdentifier)
Return a role from the roster. |
java.util.Collection<Role> |
getRoleCollection()
Return all roles in the roster as a Collection<Role> . |
java.lang.String |
getStudyIdentifier()
Return the study identifier. |
java.lang.String |
getStudyName()
Return the study name. |
java.util.Set<java.lang.String> |
getUserIdentifiersSet()
Return the user identifiers of all the roles in the roster as a Set<String> . |
boolean |
isEmpty()
Return true if the roster contains no roles. |
int |
size()
Return the number of roles in the roster. |
java.lang.String |
toString()
Return a string representation of this Roster . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String getStudyIdentifier()
public java.lang.String getStudyName()
public Role getRole(java.lang.String userIdentifier)
userIdentifier
- the identifier of the Role
to
get from the roster.
null
means there is no role in the roster with the
user identifier specified by the parameter.
non-null
means that there is a role in the roster
with the user identifier specified by the parameter, and
the return value is the specified role.public boolean containsRole(java.lang.String userIdentifier)
userIdentifier
- the identifier of the Role
to
test for.
false
means there is no role in the roster with the
user identifier specified by the parameter.
true
means that there is a role in the roster
with the user identifier specified by the parameter.public int size()
public boolean isEmpty()
true
if the roster contains no roles.
true
if the roster contains no roles.
false
otherwise.public java.util.Set<java.lang.String> getUserIdentifiersSet()
Set<String>
. This makes it possible to iterate over the
role identifiers like this:
for (String s : roster.getUserIdentifiersSet())
{ process role identifier s }
public java.util.Collection<Role> getRoleCollection()
Collection<Role>
.
This makes it possible to iterate over all roles in the roster
like this:
for (Role r : roster.getRoleCollection()) { process role r }
public java.lang.String toString()
Roster
. Note that
for a role in the roster only the role identifier is represented
as a string, not the entire role.
toString
in class java.lang.Object
Roster
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |