* (eg. the rocket listener lists) and the methods defined in RocketComponent call these.
* It also defines some other methods that concern the whole rocket, and helper methods
* that keep information about the program state.
- *
+ *
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
*/
/**
* Return the number of stages in this rocket.
- *
+ *
* @return the number of stages in this rocket.
*/
public int getStageCount() {
/**
* Return the non-negative modification ID of this rocket. The ID is changed
- * every time any change occurs in the rocket. This can be used to check
+ * every time any change occurs in the rocket. This can be used to check
* whether it is necessary to void cached data in cases where listeners can not
* or should not be used.
* <p>
* Three other modification IDs are also available, {@link #getMassModID()},
- * {@link #getAerodynamicModID()} {@link #getTreeModID()}, which change every time
- * a mass change, aerodynamic change, or tree change occur. Even though the values
- * of the different modification ID's may be equal, they should be treated totally
+ * {@link #getAerodynamicModID()} {@link #getTreeModID()}, which change every time
+ * a mass change, aerodynamic change, or tree change occur. Even though the values
+ * of the different modification ID's may be equal, they should be treated totally
* separate.
* <p>
* Note that undo events restore the modification IDs that were in use at the
* corresponding undo level. Subsequent modifications, however, produce modIDs
* distinct from those already used.
- *
+ *
* @return a unique ID number for this modification state.
*/
public int getModID() {
/**
* Return the non-negative mass modification ID of this rocket. See
* {@link #getModID()} for details.
- *
+ *
* @return a unique ID number for this mass-modification state.
*/
public int getMassModID() {
/**
* Return the non-negative aerodynamic modification ID of this rocket. See
* {@link #getModID()} for details.
- *
+ *
* @return a unique ID number for this aerodynamic-modification state.
*/
public int getAerodynamicModID() {
/**
* Return the non-negative tree modification ID of this rocket. See
* {@link #getModID()} for details.
- *
+ *
* @return a unique ID number for this tree-modification state.
*/
public int getTreeModID() {
/**
* Return the non-negative functional modificationID of this rocket.
* This changes every time a functional change occurs.
- *
+ *
* @return a unique ID number for this functional modification state.
*/
public int getFunctionalModID() {
/**
* Set whether the rocket has a perfect finish. This will affect whether the
* boundary layer is assumed to be fully turbulent or not.
- *
+ *
* @param perfectFinish whether the finish is perfect.
*/
public void setPerfectFinish(boolean perfectFinish) {
/**
* Get whether the rocket has a perfect finish.
- *
+ *
* @return the perfectFinish
*/
public boolean isPerfectFinish() {
* Freezes the rocket structure from firing any events. This may be performed to
* combine several actions on the structure into a single large action.
* <code>thaw()</code> must always be called afterwards.
- *
+ *
* NOTE: Always use a try/finally to ensure <code>thaw()</code> is called:
* <pre>
* Rocket r = c.getRocket();
* r.thaw();
* }
* </pre>
- *
+ *
* @see #thaw()
*/
public void freeze() {
* Return the default configuration. This should be used in the user interface
* to ensure a consistent rocket configuration between dialogs. It should NOT
* be used in simulations not relating to the UI.
- *
+ *
* @return the default {@link Configuration}.
*/
public Configuration getDefaultConfiguration() {
/**
* Return an array of the motor configuration IDs. This array is guaranteed
* to contain the <code>null</code> ID as the first element.
- *
+ *
* @return an array of the motor configuration IDs.
*/
public String[] getMotorConfigurationIDs() {
/**
* Add a new motor configuration ID to the motor configurations. The new ID
* is returned.
- *
+ *
* @return the new motor configuration ID.
*/
public String newMotorConfigurationID() {
/**
* Add a specified motor configuration ID to the motor configurations.
- *
+ *
* @param id the motor configuration ID.
* @return true if successful, false if the ID was already used.
*/
/**
* Remove a motor configuration ID from the configuration IDs. The <code>null</code>
* ID cannot be removed, and an attempt to remove it will be silently ignored.
- *
+ *
* @param id the motor configuration ID to remove
*/
public void removeMotorConfigurationID(String id) {
/**
* Check whether <code>id</code> is a valid motor configuration ID.
- *
+ *
* @param id the configuration ID.
* @return whether a motor configuration with that ID exists.
*/
/**
* Check whether the given motor configuration ID has motors defined for it.
- *
+ *
* @param id the motor configuration ID (may be invalid).
* @return whether any motors are defined for it.
*/
/**
* Return the user-set name of the motor configuration. If no name has been set,
* returns an empty string (not null).
- *
+ *
* @param id the motor configuration id
* @return the configuration name
*/
/**
* Set the name of the motor configuration. A name can be unset by passing
* <code>null</code> or an empty string.
- *
+ *
* @param id the motor configuration id
* @param name the name for the motor configuration
*/
/**
- * Return either the motor configuration name (if set) or its description.
- *
+ * Return either the motor configuration name (if set) or its description.
+ *
* @param id the motor configuration ID.
* @return a textual representation of the configuration
*/
}
/**
- * Return a description for the motor configuration, generated from the motor
+ * Return a description for the motor configuration, generated from the motor
* designations of the components.
- *
+ *
* @param id the motor configuration ID.
* @return a textual representation of the configuration
*/
return trans.get("Rocket.motorCount.Nomotor");
}
- // Change multiple occurrences of a motor to n x motor
+ // Change multiple occurrences of a motor to n x motor
List<String> stages = new ArrayList<String>();
for (List<String> stage : list) {
return (Stage.class.isAssignableFrom(type));
}
- /**
- * Accept a visitor to this Rocket in the component hierarchy.
- *
- * @param theVisitor the visitor that will be called back with a reference to this Rocket
- */
- @Override
- public void accept(final ComponentVisitor theVisitor) {
- theVisitor.visit(this);
- }
}