class ChainBuilder {

    public Chain<T> build() {
        DirectedGraph graph = buildGraph();
        List<Vertex> sortedVertices = graph.topologicalSort();
        return new Chain<>(chainId, components(sortedVertices));
    }

    public  ChainBuilder(String chainId);

}