Class DirectedEdgeKey<ID>

  • Type Parameters:
    ID - type of identifier

    public final class DirectedEdgeKey<ID>
    extends EdgeKey<ID>
    Used by directed implementations of AbstractGraph. AbstractGraph uses instances of this class as identifiers for Edges in the graph.
    • Constructor Detail

      • DirectedEdgeKey

        public DirectedEdgeKey​(ID from,
                               ID to)
        Creates a DirectedEdgeKey with given from and to params.
        Parameters:
        from - id of vertex
        to - id of vertex
    • Method Detail

      • equals

        public boolean equals​(Object o)
        Two DirectedEdgeKeys are equal when both from and to members match exactly.
        Overrides:
        equals in class Object
        Parameters:
        o - other object
        Returns:
        true if from and to match exactly
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object