class UndirectedGraphImpl implements UndirectedGraph<V, E> {

    @Override
    public Stream<V> getVertexObjectStream() {
        return vertices.stream().filter(Objects::nonNull).map(Vertex::getObject);
    }

}