Class BasicGraphEvent<N,​E>

  • Type Parameters:
    N - Тип вершины
    E - Тип ребра
    All Implemented Interfaces:
    GraphEvent<N,​E>

    public class BasicGraphEvent<N,​E>
    extends Object
    implements GraphEvent<N,​E>
    Описывает событие графа
    Author:
    GoCha
    • Constructor Detail

      • BasicGraphEvent

        public BasicGraphEvent​(Graph<N,​E> graph,
                               GraphAction action,
                               N node,
                               Edge<N,​E> edge)
        Конструктор
        Parameters:
        graph - Граф
        action - Действие
        node - Вершина
        edge - Ребро
    • Method Detail

      • getEdge

        public Edge<N,​E> getEdge()
        Description copied from interface: GraphEvent
        Возвраащет ребро
        Specified by:
        getEdge in interface GraphEvent<N,​E>
        Returns:
        Ребро
      • getNode

        public N getNode()
        Description copied from interface: GraphEvent
        Возвраащет вершину
        Specified by:
        getNode in interface GraphEvent<N,​E>
        Returns:
        Вершина
      • getGraph

        public Graph<N,​E> getGraph()
        Description copied from interface: GraphEvent
        Возвраащет граф в котором произошло событие
        Specified by:
        getGraph in interface GraphEvent<N,​E>
        Returns:
        Граф
      • getAction

        public GraphAction getAction()
        Description copied from interface: GraphEvent
        Возвраащет действие которое произошло
        Specified by:
        getAction in interface GraphEvent<N,​E>
        Returns:
        Действие