class InterfaceManager extends ListenerRegistry<InterfaceEvent, InterfaceListener> implements InterfaceService, InterfaceAdminService {

    @Override
    public Set<Interface> getInterfacesByIp(IpAddress ip) {
        return interfaces.values()
                .stream()
                .flatMap(set -> set.stream())
                .filter(intf -> intf.ipAddresses()
                        .stream()
                        .anyMatch(ia -> ia.ipAddress().equals(ip)))
                .collect(collectingAndThen(toSet(), ImmutableSet::copyOf));
    }

}