Interface EdgeFactory<V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Edge<V> createEdge​(V from, V to, double weight)
      Creates an edge between the from and to vertices with the given weight
      Edge<V> createEdge​(V from, V to, JsonEntry entry)
      Creates an edge between the from and to vertices filling in any given edge properties (e.g.
      Class<? extends Edge> getEdgeClass()
      Gets the type of edge this factory generates (used to validate edges being added to the graph).
      boolean isDirected()
      Indicates whether the factor produces directed or undirected edges.
    • Method Detail

      • createEdge

        Edge<V> createEdge​(V from,
                           V to,
                           double weight)
        Creates an edge between the from and to vertices with the given weight
        Parameters:
        from - the from
        to - the to
        weight - the weight
        Returns:
        the edge
      • createEdge

        Edge<V> createEdge​(V from,
                           V to,
                           JsonEntry entry)
        Creates an edge between the from and to vertices filling in any given edge properties (e.g. weight) using the JsonEntry. This method is used for deserializing a graph from json.
        Parameters:
        from - the from
        to - the to
        entry - the entry
        Returns:
        the edge
      • getEdgeClass

        Class<? extends Edge> getEdgeClass()
        Gets the type of edge this factory generates (used to validate edges being added to the graph).
        Returns:
        the edge class
      • isDirected

        boolean isDirected()
        Indicates whether the factor produces directed or undirected edges.
        Returns:
        True if the edges constructed in this factory are directed, False indicates undirected