[refactor] tightened access specifiers in FinSet.java

This commit is contained in:
Daniel_M_Williams 2018-09-03 22:54:42 -04:00
parent efd8a3e15e
commit cfef7532ab

View File

@ -79,7 +79,7 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
/** /**
* Rotation about the x-axis by 2*PI/fins. * Rotation about the x-axis by 2*PI/fins.
*/ */
protected Transformation finRotation = Transformation.IDENTITY; private Transformation finRotation = Transformation.IDENTITY;
@ -87,12 +87,12 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
* Rotation angle of the first fin. Zero corresponds to the positive y-axis. * Rotation angle of the first fin. Zero corresponds to the positive y-axis.
*/ */
private AngleMethod angleMethod = AngleMethod.RELATIVE; private AngleMethod angleMethod = AngleMethod.RELATIVE;
protected double firstFinOffset = 0; private double firstFinOffset = 0;
/** /**
* Cant angle of fins. * Cant angle of fins.
*/ */
protected double cantAngle = 0; private double cantAngle = 0;
/* Cached value: */ /* Cached value: */
private Transformation cantRotation = null; private Transformation cantRotation = null;
@ -109,7 +109,7 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
/** /**
* The cross-section shape of the fins. * The cross-section shape of the fins.
*/ */
protected CrossSection crossSection = CrossSection.SQUARE; private CrossSection crossSection = CrossSection.SQUARE;
/* /*
@ -124,9 +124,9 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
* Fin fillet properties * Fin fillet properties
*/ */
protected Material filletMaterial = null; private Material filletMaterial;
protected double filletRadius = 0; private double filletRadius = 0;
protected double filletCenterY = 0; private double filletCenterY = 0;
// Cached fin area & CG. Validity of both must be checked using finArea! // Cached fin area & CG. Validity of both must be checked using finArea!
// Fin area does not include fin tabs, CG does. // Fin area does not include fin tabs, CG does.
@ -316,7 +316,7 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
/** /**
* Return the tab front edge position from the front of the fin. * Return the tab front edge position from the front of the fin.
*/ */
public double getTabFrontEdge() { private double getTabFrontEdge() {
switch (this.tabRelativePosition) { switch (this.tabRelativePosition) {
case FRONT: case FRONT:
return tabShift; return tabShift;
@ -335,7 +335,7 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
/** /**
* Return the tab trailing edge position *from the front of the fin*. * Return the tab trailing edge position *from the front of the fin*.
*/ */
public double getTabTrailingEdge() { private double getTabTrailingEdge() {
switch (this.tabRelativePosition) { switch (this.tabRelativePosition) {
case FRONT: case FRONT:
return tabLength + tabShift; return tabLength + tabShift;
@ -388,11 +388,11 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
return getFilletMass() + getFinMass(); return getFilletMass() + getFinMass();
} }
public double getFinMass() { private double getFinMass() {
return getComponentVolume() * material.getDensity(); return getComponentVolume() * material.getDensity();
} }
public double getFilletMass() { private double getFilletMass() {
return getFilletVolume() * filletMaterial.getDensity(); return getFilletVolume() * filletMaterial.getDensity();
} }
@ -423,7 +423,7 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
} }
} }
public double getFilletVolume() { private double getFilletVolume() {
/* /*
* Here is how the volume of the fillet is found. It assumes a circular concave * Here is how the volume of the fillet is found. It assumes a circular concave
* fillet tangent to the fin and the body tube. * fillet tangent to the fin and the body tube.