Class VertexUtils


  • public class VertexUtils
    extends Object
    Utilities for vertices that ar unfit for inclusion in the class itself
    • Constructor Detail

      • VertexUtils

        public VertexUtils()
    • Method Detail

      • updateVertexEdges

        public static <V extends Vertex,​E extends Edge> void updateVertexEdges​(Iterable<V> vertices,
                                                                                     Function<E,​E> edgeToEdgeMapping,
                                                                                     boolean removeMissingMappings)
        Update the edges of all vertices based on the mapping provided (if any)
        Type Parameters:
        V - type of vertex
        E - type of edge
        Parameters:
        vertices - the vertices to update
        edgeToEdgeMapping - to use should contain original edge as currently used on vertex and then the value is the new edge to replace it
        removeMissingMappings - when true if there is no mapping, the edge is removed as adjacent to the vertex, otherwise they are left in-tact