Code example for Vector

Methods: addAll, removeAllElements

0
 
	/* (non-Javadoc) 
	 * @see eu.planets_project.tb.api.model.ExperimentApproval#setApprovalRequiredRoles(java.util.Vector) 
	 */ 
	public void setApprovalRequiredRoles(List<Integer> roleIDs) {
		this.vReqRoles.removeAllElements();
		this.vReqRoles.addAll(roleIDs);
	} 
 
	/* (non-Javadoc) 
	 * @see eu.planets_project.tb.api.model.ExperimentApproval#setApprovalUser(eu.planets_project.tb.api.model.User) 
	 */ 
/*	public void setApprovalUser(User user) { 
		//approval required roles were added 
		if (this.vReqRoles.size()>0){ 
			Vector<Integer> vUserRoleIDs = user.getRolesIDs(); 
			Iterator<Integer> itUserRoleIDs = vUserRoleIDs.iterator(); 
			int i = 0; 
			while(itUserRoleIDs.hasNext()){ 
				//check if user is registered to all required roles for approval 
				int iRole = itUserRoleIDs.next();