private void verifyContains(Collection items, ContentItem content) { for (Iterator it = items.iterator(); it.hasNext(); ) { Item item = (Item) it.next(); if (item instanceof ContentItem && item.getName().equals(content.getName())) return; } Assert.fail("content not found"); }
/* (non-Javadoc) * @see org.osaf.cosmo.model.copy.InterfaceCollectionItem#getChildByName(java.lang.String) */ public Item getChildByName(String name) { for (Item child : children) { if (child.getName().equals(name)) return child; } return null; }