Iterator iterator = this.getAssignmentsReceived(null, null).iterator();
Iterator iterator = this.getAssignmentsReceived(null, null, null).iterator();
  public Set getGrantableFunctions(Category category)      throws ObjectNotFoundException  {    try    {      // First, check to see if the we are the Signet superSubject.      // That Subject can grant any function in any category to anyone.      if (this.equals(this.signet.getSuperPrivilegedSubject()))      {        return category.getFunctions();      }    }    catch (ObjectNotFoundException onfe)    {      throw new SignetRuntimeException(onfe);    }    Set functions = new HashSet();    Iterator iterator = this.getAssignmentsReceived(null, null).iterator();    while (iterator.hasNext())    {      Assignment assignment = (Assignment) (iterator.next());      Function candidateFunction = assignment.getFunction();      Category candidateCategory = candidateFunction.getCategory();      if (assignment.isGrantable() && candidateCategory.equals(category))      {        functions.add(candidateFunction);      }    }    return UnmodifiableSet.decorate(functions);  }