Class ComputerGraph.ComputerEdge

    • Constructor Detail

      • ComputerEdge

        public ComputerEdge​(Edge edge)
    • Method Detail

      • vertices

        public Iterator<Vertex> vertices​(Direction direction)
        Description copied from interface: Edge
        Retrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction is Direction.BOTH then the iterator order is: Direction.OUT then Direction.IN.
        Specified by:
        vertices in interface Edge
        Parameters:
        direction - Get the incoming vertex, outgoing vertex, or both vertices
        Returns:
        An iterator with 1 or 2 vertices
      • outVertex

        public Vertex outVertex()
        Description copied from interface: Edge
        Get the outgoing/tail vertex of this edge.
        Specified by:
        outVertex in interface Edge
        Returns:
        the outgoing vertex of the edge
      • inVertex

        public Vertex inVertex()
        Description copied from interface: Edge
        Get the incoming/head vertex of this edge.
        Specified by:
        inVertex in interface Edge
        Returns:
        the incoming vertex of the edge