Class HyperDirEdge<T extends Node>

java.lang.Object
org.tweetyproject.graphs.GeneralEdge<T>
org.tweetyproject.graphs.HyperDirEdge<T>
Type Parameters:
T - The type of the nodes this edge connects
Direct Known Subclasses:
SetAttack

public class HyperDirEdge<T extends Node> extends GeneralEdge<T>
Instances of this class represent abstract edges.
Author:
Sebastian Franke
  • Constructor Details

    • HyperDirEdge

      public HyperDirEdge(Set<T> attackers, T nodeB)
      Creates a new edge for the given nodes.
      Parameters:
      attackers - some node.
      nodeB - some node.
    • HyperDirEdge

      public HyperDirEdge(T attackers, T nodeB)
      Creates a new edge for the given nodes.
      Parameters:
      attackers - some node.
      nodeB - some node.
    • HyperDirEdge

      public HyperDirEdge(Set<T> nodeA, T nodeB, String label)
      Creates a new edge for the given nodes.
      Parameters:
      nodeA - some node.
      nodeB - some node.
      label - some edge label.
  • Method Details

    • getNodeA

      public Set<T> getNodeA()
      Returns the first node of this edge.
      Returns:
      the first node of this edge.
    • getNodeB

      public T getNodeB()
      Returns the second node of this edge.
      Returns:
      the second node of this edge.
    • getLabel

      public String getLabel()
      Returns the label of this edge.
      Returns:
      the label of this edge.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • remove

      public void remove(T arg)
      Removes the specified argument from the node. If the argument is present in nodeA, it is removed from nodeA. If the argument is equal to nodeB, nodeB is set to null. If the argument is not found in either nodeA or nodeB, the method returns without making any changes.
      Parameters:
      arg - The argument to be removed. It will be removed from nodeA if present, or nodeB will be set to null if the argument is equal to nodeB.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object