+
+ /**
+ * Retrieve the List of MotorMounts in the Rocket.
+ *
+ * Each element returned will a RocketComponent which implements MotorMount. Further isMotorMount()
+ * returns true.
+ *
+ * @return List<MotorMount>
+ */
+ public final List<MotorMount> getMotorMounts() {
+ Iterator<RocketComponent> it = iterator();
+ List<MotorMount> mmts = new ArrayList<MotorMount>();
+
+ while (it.hasNext()) {
+ RocketComponent c = it.next();
+ if (c instanceof MotorMount) {
+ if ( ((MotorMount)c).isMotorMount() ) {
+ mmts.add((MotorMount) c);
+ }
+ }
+ }
+ return mmts;
+ }
+