<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<divclass="type-signature"><spanclass="modifiers">public class </span><spanclass="element-name type-name-label">RobotFactory</span>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></span></div>
<divclass="block">Factory-Klasse für R2D2 und C3PO</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(java.lang.String)"class="member-name-link">RobotFactory</a><wbr>(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> name)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Benennt die RobotFactory und setzt Nexus-Roboter "Pris" ins Roboterlager</div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#addRobot(Dom%C3%A4ne.RobotType,java.lang.String)"class="member-name-link">addRobot</a><wbr>(<ahref="RobotType.html"title="enum class in Domäne">RobotType</a> robotType,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> name)</code></div>
<divclass="block">Erstellt neue Roboter nach Anforderungen, speichert diese im Roboterlager und
gibt die Id des erstellten Roboters zurück</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></code></div>
<divclass="block">Ruft die Methoden think() und speak() eines Roboters auf und gibt dessen
Ausgabe wieder.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></code></div>
<divclass="block">Duchsucht das Roboterlager nach einem bestimmten Roboter</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></code></div>
<divclass="block">Schaltet einen Roboter ein wenn er ausgeschaltet ist und schaltet ihn aus
wenn er eingeschaltet ist</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"title="class or interface in java.lang"class="external-link">toString</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">RobotFactory</span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> name)</span></div>
<divclass="block">Benennt die RobotFactory und setzt Nexus-Roboter "Pris" ins Roboterlager</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - Name der RobotFactory</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">int</span> <spanclass="element-name">addRobot</span><wbr><spanclass="parameters">(<ahref="RobotType.html"title="enum class in Domäne">RobotType</a> robotType,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> name)</span></div>
<divclass="block">Erstellt neue Roboter nach Anforderungen, speichert diese im Roboterlager und
gibt die Id des erstellten Roboters zurück</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>robotType</code> - entweder R2D2 oder C3PO</dd>
<dd><code>name</code> - Name des Roboters</dd>
<dt>Returns:</dt>
<dd>Gibt die ID des erstellten Roboters zurück.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getName()">
<h3>getName</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></span> <spanclass="element-name">getName</span>()</div>
<divclass="block">Gibt den Namen der RobotFactory zurück.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>Name der RobotFactory</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="findeRoboter(int)">
<h3>findeRoboter</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="Roboter.html"title="class in Domäne">Roboter</a></span> <spanclass="element-name">findeRoboter</span><wbr><spanclass="parameters">(int id)</span></div>
<divclass="block">Duchsucht das Roboterlager nach einem bestimmten Roboter</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>id</code> - Id des Roboters</dd>
<dt>Returns:</dt>
<dd>Instanz des Roboters mit der gefragten Id</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></span> <spanclass="element-name">aufrufSpeakAndThink</span><wbr><spanclass="parameters">(int id,
int[] zahlen)</span>
throws <spanclass="exceptions"><ahref="../tpe/exceptions/roboter/exceptions/RobotException.html"title="class in tpe.exceptions.roboter.exceptions">RobotException</a></span></div>
<divclass="block">Ruft die Methoden think() und speak() eines Roboters auf und gibt dessen
Ausgabe wieder.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>id</code> - Id des Roboters</dd>
<dd><code>zahlen</code> - Int-Array</dd>
<dt>Returns:</dt>
<dd>String mit dem Inhalt des gegebenen Arrays, nachdem es von dem
Roboter sortiert wurde.</dd>
<dt>Throws:</dt>
<dd><code><ahref="../tpe/exceptions/roboter/exceptions/RobotException.html"title="class in tpe.exceptions.roboter.exceptions">RobotException</a></code></dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="letzterFehler(int)">
<h3>letzterFehler</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="../tpe/exceptions/roboter/exceptions/RobotException.html"title="class in tpe.exceptions.roboter.exceptions">RobotException</a></span> <spanclass="element-name">letzterFehler</span><wbr><spanclass="parameters">(int id)</span></div>
<divclass="block">Gibt den letzten Fehler zurück, auf den der Roboter gestoßen ist</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>id</code> - Id des Roboters</dd>
<dt>Returns:</dt>
<dd>Die RobotException welche im Roboter gespeichert ist</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="datenDesRoboters(int)">
<h3>datenDesRoboters</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></span> <spanclass="element-name">datenDesRoboters</span><wbr><spanclass="parameters">(int id)</span></div>
<divclass="block">Gibt die Daten eines Roboters wieder</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>id</code> - Id des Roboters</dd>
<dt>Returns:</dt>
<dd>String mit Typ, Namen und Id des Roboters</dd>