Class DefaultEdge

  • All Implemented Interfaces:
    Edge

    public class DefaultEdge
    extends java.lang.Object
    implements Edge
    Author:
    Evren Sirin
    • Method Detail

      • getNeighbor

        public Node getNeighbor​(Node node)
        Given a node upon which this edge is incident, the opposite incident _node is returned.
        Specified by:
        getNeighbor in interface Edge
        Parameters:
        node - a node upon which this edge is incident
        Returns:
        the other node this edge is incident upon
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFrom

        public Individual getFrom()
        Specified by:
        getFrom in interface Edge
        Returns:
        Returns the source of this edge
      • getRole

        public Role getRole()
        Specified by:
        getRole in interface Edge
        Returns:
        Returns the role.
      • getTo

        public Node getTo()
        Specified by:
        getTo in interface Edge
        Returns:
        Returns the target of the edge
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getFromName

        public openllet.aterm.ATermAppl getFromName()
        Specified by:
        getFromName in interface Edge
        Returns:
        Returns the name of the source node
      • getToName

        public openllet.aterm.ATermAppl getToName()
        Specified by:
        getToName in interface Edge
        Returns:
        Returns the name of the target node