package Graphen;

import java.util.ArrayList;

public class Graph {
	// Graph hat Viele Knoten
	ArrayList<Knote> KnotenGraph = new ArrayList<>();
	
	// füge Knote hinzu
	public void addknoten(Knote k) {
	
		KnotenGraph.add(k);
	}
	
	

	public Knote getKnote(String name) {
		for (Knote kAusKnotenGraph: KnotenGraph) {
			if (kAusKnotenGraph.getName().equalsIgnoreCase(name))
				return kAusKnotenGraph;
		}
		return null;
	}
	
	public void printKnotenGraph() {
		for (Knote a : KnotenGraph)
			System.out.println(a.getName());
	}
}
