java.lang.Object
edu.internet2.middleware.grouper.app.graph.GraphEdge

public class GraphEdge extends Object
A GraphEdge represents a directional connection between two GraphNodes
  • Constructor Details

    • GraphEdge

      public GraphEdge(GraphNode fromNode, GraphNode toNode)
      Constructor defining a directional edge, from one node to another. Depending on the object type of either node, this will also set its VisualStyle object type enum.
      Parameters:
      fromNode -
      toNode -
    • GraphEdge

      public GraphEdge(GraphNode fromNode, GraphNode toNode, StyleObjectType styleObjecType)
      Constructor defining a directional edge, when the type is already known. Useful for complement factors, since the general calculations can't distinguish left and right
      Parameters:
      fromNode -
      toNode -
      styleObjecType -
  • Method Details

    • equals

      public boolean equals(Object obj)
      Compares two edges and considers them equal if the target and destination nodes are the same
      Overrides:
      equals in class Object
      Parameters:
      obj - GraphEdge to compare
      Returns:
    • hashCode

      public int hashCode()
      Computes the hash code based on the origin and destination nodes
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • getFromNode

      public GraphNode getFromNode()
      gets the origin node for the edge
      Returns:
      origin node
    • getToNode

      public GraphNode getToNode()
      gets the destination node for the edge
      Returns:
      destination node
    • getStyleObjectType

      public StyleObjectType getStyleObjectType()
      gets the VisualStyle object type enum
      Returns:
      VisualStyle object type