Class AbstractVertex<V,​E>

  • Type Parameters:
    V - the type of the decorated vertex value
    E - the type of the decorated edge value
    All Implemented Interfaces:
    MetaTagCollection, Vertex<V,​E>
    Direct Known Subclasses:
    VertexImpl, VertexViewImpl

    public abstract class AbstractVertex<V,​E>
    extends MetaTagCollectionImpl
    implements Vertex<V,​E>

    Abstract base class to be used for different vertex implementation, that are based on a graph state.

    Since:
    1.0
    Author:
    Andreas Pointner
    • Constructor Detail

      • AbstractVertex

        public AbstractVertex()
    • Method Detail

      • getAdjacentVertices

        public Collection<Vertex<V,​E>> getAdjacentVertices()
        Description copied from interface: Vertex
        vertex has a collection of edges, thus pointing to several other vertices
        Specified by:
        getAdjacentVertices in interface Vertex<V,​E>
        Returns:
        a collection of vertex
      • getIncomingEdges

        public Collection<Edge<V,​E>> getIncomingEdges()
        Description copied from interface: Vertex

        Returns all edges that are incoming into this vertex.

        If this vertex is seen as v, then all edges e are returned that match x-(e)->v

        Specified by:
        getIncomingEdges in interface Vertex<V,​E>
        Returns:
        returns a collection of edges
      • getOutgoingEdges

        public Collection<Edge<V,​E>> getOutgoingEdges()
        Description copied from interface: Vertex

        Returns all edges which are outgoing from this vertex.

        If this vertex is seen as v, then all edges e are returned that match v-(e)->x

        Specified by:
        getOutgoingEdges in interface Vertex<V,​E>
        Returns:
        returns a collection of edges
      • setElement

        public abstract void setElement​(V element)
        Method that allows to change the decorated element - this is especially needed at graph creation time.
        Parameters:
        element - The new decorated element.