Class DefaultGraphFactory<N,​E>

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

    public class DefaultGraphFactory<N,​E>
    extends Object
    implements GraphFactory<N,​E>
    Фабрика классов графа
    Author:
    GoCha
    • Constructor Detail

      • DefaultGraphFactory

        public DefaultGraphFactory()
    • Method Detail

      • createEdge

        public Edge<N,​E> createEdge​(N a,
                                          N b,
                                          E e)
        Description copied from interface: GraphFactory
        Создание ребра с вершинами
        Specified by:
        createEdge in interface GraphFactory<N,​E>
        Parameters:
        a - Вершина А
        b - Вершина Б
        e - Ребро между вершинами А и Б
        Returns:
        Ребро
      • createEdgePairs

        public List<Edge<N,​E>> createEdgePairs()
        Description copied from interface: GraphFactory
        Создание списка ребр с вершинами
        Specified by:
        createEdgePairs in interface GraphFactory<N,​E>
        Returns:
        Список ребр
      • createNodes

        public List<N> createNodes()
        Description copied from interface: GraphFactory
        Создаение списка вершин
        Specified by:
        createNodes in interface GraphFactory<N,​E>
        Returns:
        Список вершин
      • createEdges

        public List<E> createEdges()
        Description copied from interface: GraphFactory
        Создание списка ребр
        Specified by:
        createEdges in interface GraphFactory<N,​E>
        Returns:
        Список ребр