@Test public void testApplyTwice() throws Exception { Predicate<Authorizable> predicate = getDeclaredMembershipPredicate(testGroup.getID()); predicate.apply(testMember); assertTrue(predicate.apply(testMember)); }
@Override public boolean apply(@Nullable Authorizable authorizable) { String id = saveGetContentId(authorizable); if (id != null) { if (declaredMemberContentIds.contains(id)) { return true; } else { while (contentIdIterator.hasNext()) { String memberContentId = contentIdIterator.next(); declaredMemberContentIds.add(memberContentId); if (memberContentId.equals(id)) { return true; } } } } return false; }
DeclaredMembershipPredicate implements Predicate<Authorizable> { @Override public boolean apply(@Nullable Authorizable authorizable) { String id = saveGetContentId(authorizable); if (id != null) { if (declaredMemberContentIds.contains(id)) { return true; } else { while (contentIdIterator.hasNext()) { String memberContentId = contentIdIterator.next(); declaredMemberContentIds.add(memberContentId); if (memberContentId.equals(id)) { return true; } } } } return false; } }
DeclaredMembershipPredicate implements Predicate<Authorizable> { @Override public boolean apply(@Nullable Authorizable authorizable) { String id = saveGetContentId(authorizable); if (id != null) { if (declaredMemberContentIds.contains(id)) { return true; } else { while (contentIdIterator.hasNext()) { String memberContentId = contentIdIterator.next(); declaredMemberContentIds.add(memberContentId); if (memberContentId.equals(id)) { return true; } } } } return false; } DeclaredMembershipPredicate(UserManagerImpl userManager, String groupId); }
DeclaredMembershipPredicate implements Predicate<Authorizable> { @Override public boolean apply(@Nullable Authorizable authorizable) { String id = saveGetContentId(authorizable); if (id != null) { if (declaredMemberContentIds.contains(id)) { return true; } else { while (contentIdIterator.hasNext()) { String memberContentId = contentIdIterator.next(); declaredMemberContentIds.add(memberContentId); if (memberContentId.equals(id)) { return true; } } } } return false; } DeclaredMembershipPredicate(UserManagerImpl userManager, String groupId); @Override boolean apply(@Nullable Authorizable authorizable); }
DeclaredMembershipPredicate implements Predicate<Authorizable> { @Override public boolean apply(@Nullable Authorizable authorizable) { String id = saveGetContentId(authorizable); if (id != null) { if (declaredMemberContentIds.contains(id)) { return true; } else { while (contentIdIterator.hasNext()) { String memberContentId = contentIdIterator.next(); declaredMemberContentIds.add(memberContentId); if (memberContentId.equals(id)) { return true; } } } } return false; } DeclaredMembershipPredicate(UserManagerImpl userManager, String groupId); @Override boolean apply(@Nullable Authorizable authorizable);  }