/** * Filters out <code>Authors</code> that are deactivated. It returns a group of all the <code> * Authors</code> which are active. * * @param authorGroup Specifies the group of authors on which to apply the filter * @return the group of all the authors in the group that are active */ public static AuthorGroup getAllActiveAuthors(AuthorGroup authorGroup) { Iterator iterator; Author author; AuthorGroup result; result = new DefaultAuthorGroup(); iterator = authorGroup.getIterator(); while (iterator.hasNext()) { author = (DefaultAuthor) iterator.next(); if (author.isActive()) result.addAuthor(author); } return result; }