Class BasicGraphEvent<N,​E>

java.lang.Object
xyz.cofe.collection.graph.BasicGraphEvent<N,​E>
Type Parameters:
N - Тип вершины
E - Тип ребра
All Implemented Interfaces:
GraphEvent<N,​E>

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

    Constructors 
    Constructor Description
    BasicGraphEvent​(Graph<N,​E> graph, GraphAction action, N node, Edge<N,​E> edge)
    Конструктор
  • Method Summary

    Modifier and Type Method Description
    GraphAction getAction()
    Возвраащет действие которое произошло
    Edge<N,​E> getEdge()
    Возвраащет ребро
    Graph<N,​E> getGraph()
    Возвраащет граф в котором произошло событие
    N getNode()
    Возвраащет вершину

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BasicGraphEvent

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

    • 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:
      Действие