[rename] renamed count -> instanceCount to be more descriptive

This commit is contained in:
Daniel_M_Williams 2017-07-01 14:39:55 -04:00
parent e5f40c375d
commit 8e8ba9324f
2 changed files with 17 additions and 17 deletions

View File

@ -14,7 +14,7 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
private static final Translator trans = Application.getTranslator();
//private static final Logger log = LoggerFactory.getLogger(BoosterSet.class);
protected int count = 1;
protected int instanceCount = 1;
protected double angularSeparation = Math.PI;
protected double angularPosition_rad = 0;
@ -22,16 +22,16 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
protected double radialPosition_m = 0;
public ParallelStage() {
this.count = 2;
this.instanceCount = 2;
this.relativePosition = Position.BOTTOM;
this.angularSeparation = Math.PI * 2 / this.count;
this.angularSeparation = Math.PI * 2 / this.instanceCount;
}
public ParallelStage( final int _count ){
this();
this.count = _count;
this.angularSeparation = Math.PI * 2 / this.count;
this.instanceCount = _count;
this.angularSeparation = Math.PI * 2 / this.instanceCount;
}
@Override
@ -98,7 +98,7 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
@Override
public int getInstanceCount() {
return this.count;
return this.instanceCount;
}
@Override
@ -119,8 +119,8 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
return;
}
this.count = newCount;
this.angularSeparation = Math.PI * 2 / this.count;
this.instanceCount = newCount;
this.angularSeparation = Math.PI * 2 / this.instanceCount;
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
}
@ -139,8 +139,8 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
Coordinate center = Coordinate.ZERO;
double curAngle = startAngle;
Coordinate[] toReturn = new Coordinate[this.count];
for (int instanceNumber = 0; instanceNumber < this.count; instanceNumber++) {
Coordinate[] toReturn = new Coordinate[this.instanceCount];
for (int instanceNumber = 0; instanceNumber < this.instanceCount; instanceNumber++) {
final double curY = radius * Math.cos(curAngle);
final double curZ = radius * Math.sin(curAngle);
toReturn[instanceNumber] = center.add(0, curY, curZ );

View File

@ -13,7 +13,7 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
private static final Translator trans = Application.getTranslator();
//private static final Logger log = LoggerFactory.getLogger(PodSet.class);
protected int count = 1;
protected int instanceCount = 2;
protected double angularSeparation = Math.PI;
protected double angularPosition_rad = 0;
@ -21,7 +21,7 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
protected double radialPosition_m = 0;
public PodSet() {
this.count = 2;
this.instanceCount = 2;
this.relativePosition = Position.BOTTOM;
}
@ -87,8 +87,8 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
Coordinate center = Coordinate.ZERO;
double curAngle = startAngle;
Coordinate[] toReturn = new Coordinate[this.count];
for (int instanceNumber = 0; instanceNumber < this.count; instanceNumber++) {
Coordinate[] toReturn = new Coordinate[this.instanceCount];
for (int instanceNumber = 0; instanceNumber < this.instanceCount; instanceNumber++) {
final double curY = radius * Math.cos(curAngle);
final double curZ = radius * Math.sin(curAngle);
toReturn[instanceNumber] = center.add(0, curY, curZ );
@ -193,7 +193,7 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
@Override
public int getInstanceCount() {
return this.count;
return this.instanceCount;
}
@ -205,8 +205,8 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
return;
}
this.count = newCount;
this.angularSeparation = Math.PI * 2 / this.count;
this.instanceCount = newCount;
this.angularSeparation = Math.PI * 2 / this.instanceCount;
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
}