@Test public void testLookup() { final AbstractHostCollection c = new AbstractHostCollection() { }; final Host bookmark = new Host(new TestProtocol()); assertFalse(c.find(bookmark)); assertNull(c.lookup(bookmark.getUuid())); c.add(bookmark); assertTrue(c.find(bookmark)); assertNotNull(c.lookup(bookmark.getUuid())); }
public Host lookup(final String uuid) { return this.stream().filter(h -> h.getUuid().equals(uuid)).findFirst().orElse(null); }
AbstractHostCollection extends Collection<Host> implements EditableCollection { public Host lookup(final String uuid) { return this.stream().filter(h -> h.getUuid().equals(uuid)).findFirst().orElse(null); } }
AbstractHostCollection extends Collection<Host> implements EditableCollection { public Host lookup(final String uuid) { return this.stream().filter(h -> h.getUuid().equals(uuid)).findFirst().orElse(null); } AbstractHostCollection();  AbstractHostCollection(final java.util.Collection<Host> c); }
AbstractHostCollection extends Collection<Host> implements EditableCollection { public Host lookup(final String uuid) { return this.stream().filter(h -> h.getUuid().equals(uuid)).findFirst().orElse(null); } AbstractHostCollection();  AbstractHostCollection(final java.util.Collection<Host> c); static AbstractHostCollection empty(); void sort(); Map<String, List<Host>> groups(final HostFilter filter); @Override boolean allowsAdd(); @Override boolean allowsDelete(); @Override boolean allowsEdit(); boolean find(final Host bookmark); Host lookup(final String uuid); String getComment(final Host h); }
AbstractHostCollection extends Collection<Host> implements EditableCollection { public Host lookup(final String uuid) { return this.stream().filter(h -> h.getUuid().equals(uuid)).findFirst().orElse(null); } AbstractHostCollection();  AbstractHostCollection(final java.util.Collection<Host> c); static AbstractHostCollection empty(); void sort(); Map<String, List<Host>> groups(final HostFilter filter); @Override boolean allowsAdd(); @Override boolean allowsDelete(); @Override boolean allowsEdit(); boolean find(final Host bookmark); Host lookup(final String uuid); String getComment(final Host h);  }