1 package net.sf.openrocket.preset;
3 import net.sf.openrocket.motor.Manufacturer;
4 import net.sf.openrocket.rocketcomponent.RocketComponent;
7 * A model for a preset component.
9 * A preset component contains a component class type, manufacturer information,
10 * part information, and getter methods for various properties of the component.
12 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
14 public abstract class RocketComponentPreset {
16 private final Class<? extends RocketComponent> componentClass;
17 private final Manufacturer manufacturer;
18 private final String partName;
19 private final String partNo;
20 private final String partDescription;
23 public RocketComponentPreset(Class<? extends RocketComponent> componentClass, Manufacturer manufacturer,
24 String partName, String partNo, String partDescription) {
25 this.componentClass = componentClass;
26 this.manufacturer = manufacturer;
27 this.partName = partName;
29 this.partDescription = partDescription;
34 * Return the component class that this preset defines.
36 public Class<? extends RocketComponent> getComponentClass() {
37 return componentClass;
41 * Return the manufacturer of this preset component.
43 public Manufacturer getManufacturer() {
48 * Return the part name. This is a short, human-readable name of the part.
50 public String getPartName() {
55 * Return the part number. This is the part identifier (e.g. "BT-50").
57 public String getPartNo() {
62 * Return the part description. This is a longer description of the component.
64 public String getPartDescription() {
65 return partDescription;