Skip to content

Commit

Permalink
Fix whitespace
Browse files Browse the repository at this point in the history
- Added missing newline near ending class braces
- Added missing newline near opening class braces
- Removed trailing tabs
- Removed trailing newlines
- Changed Allman brace style to K&R
  • Loading branch information
rr- committed Sep 1, 2016
1 parent 4307c8a commit 22f391c
Show file tree
Hide file tree
Showing 49 changed files with 71 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ public void setApplicationContext(final ApplicationContext applicationContext) t
public static ApplicationContext getApplicationContext() {
return ApplicationContextHolder.applicationContext;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ public class Constants {
public static final int INTEGER_ORIGIN_ZERO_VALUE = 0;
public static final int LOOP_INC_VALUE = 1;
public static final int LOOP_INIT_VALUE = 1;

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public static void main(final String[] args) {
((ConfigurableApplicationContext) context).close();

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ public void fizzBuzz(final int nFizzBuzzUpperLimit) {
this._fizzBuzzSolutionStrategyFactory.createFizzBuzzSolutionStrategy();
mySolutionStrategy.runSolution(nFizzBuzzUpperLimit);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ public BuzzStringReturnerFactory(final BuzzStringReturner _myBuzzStringReturner)
public StringStringReturner createStringStringReturner() {
return this._myBuzzStringReturner;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ public LoopFinalizer createLoopFinalizer(final int nLoopFinalValue) {
public LoopStep createLoopStep() {
return this._loopStep;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public boolean evaluateLoop(final int nCurrentNumber, final int nTotalCount) {
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ public LoopFinalizer(final int nLoopFinalValue) {
public int getLoopFinalizationPoint() {
return this.nStoredLoopFinalValue;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ public class LoopInitializer {
public int getLoopInitializationPoint() {
return Constants.LOOP_INIT_VALUE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ public int divide(final int nFirstInteger, final int nSecondInteger) {
return nIntegerQuotient;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ public static boolean numberIsMultipleOfAnotherNumber(final int nFirstNumber, fi
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ public void printBuzz() {

myOutputAdapter.output(myBuzzStringReturner.getReturnString());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ public void print() {
public void printValue(final Object value) {
this.print();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public boolean isEvenlyDivisible(final int theInteger) {
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ public void runSolution(final int nFizzBuzzUpperLimit) {
final LoopRunner loopRunner = new LoopRunner(loopContext, loopContext, this._loopPayloadExecution);
loopRunner.runLoop();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public boolean isEvenlyDivisible(final int theInteger) {
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ public void performGenerationForCurrentStep(final SingleStepOutputGenerationPara
}
this.myNewLinePrinter.print();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public final class FizzBuzzOutputStrategyToFizzBuzzExceptionSafeOutputStrategyAdapter implements FizzBuzzExceptionSafeOutputStrategy {

private final FizzBuzzOutputStrategy _fizzBuzzOutputStrategy;

public FizzBuzzOutputStrategyToFizzBuzzExceptionSafeOutputStrategyAdapter(final FizzBuzzOutputStrategy fizzBuzzOutputStrategy) {
super();
this._fizzBuzzOutputStrategy = fizzBuzzOutputStrategy;
Expand All @@ -22,4 +22,5 @@ public void output(final String outputStringToOutput) {
// We're the enterprise...we don't get throwables either!
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public final class LoopContextStateRetrievalToSingleStepOutputGenerationAdapter implements SingleStepOutputGenerationParameter {

private final LoopContextStateRetrieval _retrievalObjectToAdapt;

public LoopContextStateRetrievalToSingleStepOutputGenerationAdapter(final LoopContextStateRetrieval retrievalObjectToAdapt) {
super();
this._retrievalObjectToAdapt = retrievalObjectToAdapt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

@Service
public class FirstIsLargerThanSecondDoubleComparator {

public boolean FirstIsLargerThanSecond(final double dbFirstDoubleToCompare, final double dbSecondDoubleToCompare) {
if (dbFirstDoubleToCompare > dbSecondDoubleToCompare) {
return true;
} else {
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

@Service
public class FirstIsSmallerThanSecondDoubleComparator {

public boolean FirstIsSmallerThanSecond(final double dbFirstDoubleToCompare, final double dbSecondDoubleToCompare) {
if (dbFirstDoubleToCompare < dbSecondDoubleToCompare) {
return true;
} else {
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ public static boolean areTwoIntegersEqual(final int nFirstInteger, final int nSe
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ public static ThreeWayIntegerComparisonResult Compare(final int nFirstInteger, f
throw new UnsupportedOperationException(Constants.THE_INTEGERS_COULD_NOT_BE_COMPARED);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import org.springframework.stereotype.Service;

@Service
public final class BuzzStrategyConstants
{
public final class BuzzStrategyConstants {

private BuzzStrategyConstants() {}

public static final int BUZZ_INTEGER_CONSTANT_VALUE = 5;

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import org.springframework.stereotype.Service;

@Service
public final class FizzStrategyConstants
{
public final class FizzStrategyConstants {

private FizzStrategyConstants() {}

public static final int FIZZ_INTEGER_CONSTANT_VALUE = 3;

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import org.springframework.stereotype.Service;

@Service
public final class NoFizzNoBuzzStrategyConstants
{
public final class NoFizzNoBuzzStrategyConstants {

private NoFizzNoBuzzStrategyConstants() {}

public static final int NO_BUZZ_INTEGER_CONSTANT_VALUE = BuzzStrategyConstants.BUZZ_INTEGER_CONSTANT_VALUE;
public static final int NO_FIZZ_INTEGER_CONSTANT_VALUE = FizzStrategyConstants.FIZZ_INTEGER_CONSTANT_VALUE;

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ public static int Convert(final double dbDoubleToConvert) {
final int nConversionResult = (int) dbDoubleToConvert;
return nConversionResult;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ public static double Convert(final int nIntegerToConvert) {
final double dbConversionResult = (double) nIntegerToConvert;
return dbConversionResult;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ public String getReturnString() {
final String myString = myStringBuilder.toString();
return new String(myString);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ public String getReturnString() {
final String myString = myStringBuilder.toString();
return new String(myString);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces;

public interface FizzBuzz {

void fizzBuzz(int nFizzBuzzUpperLimit);

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies.FizzBuzzOutputStrategy;

public interface FizzBuzzOutputStrategyFactory {

public FizzBuzzOutputStrategy createOutputStrategy();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.printers.IntegerPrinter;

public interface IntegerPrinterFactory {

public IntegerPrinter createPrinter();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.stringreturners.IntegerStringReturner;

public interface IntegerStringReturnerFactory {

public IntegerStringReturner createIntegerStringReturner();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies.IsEvenlyDivisibleStrategy;

public interface IsEvenlyDivisibleStrategyFactory {

public IsEvenlyDivisibleStrategy createIsEvenlyDivisibleStrategy();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.visitors.OutputGenerationContextVisitor;

public interface OutputGenerationContextVisitorFactory {

public OutputGenerationContextVisitor createVisitor();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.printers.StringPrinter;

public interface StringPrinterFactory {

public StringPrinter createStringPrinter();

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
public interface StringStringReturnerFactory {

public StringStringReturner createStringStringReturner();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
public interface FizzBuzzUpperLimitParameter {

public int obtainUpperLimitValue();
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.printers;

public interface DataPrinter {

public void print();
public void printValue(Object value);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.io.IOException;

public interface FizzBuzzOutputStrategy {

public void output(String output) throws IOException;

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies;

public interface IsEvenlyDivisibleStrategy {

public boolean isEvenlyDivisible(int theInteger);

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies;

public interface OutputGenerationStrategy {

void performGenerationForCurrentStep(SingleStepOutputGenerationParameter generationParameter);

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.stringreturners;

public interface IntegerStringReturner {

public String getIntegerReturnString(int theInteger);

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.stringreturners;

public interface StringStringReturner {

public String getReturnString();

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies.IsEvenlyDivisibleStrategy;

public interface OutputGenerationContext {

public IsEvenlyDivisibleStrategy getStrategy();
public DataPrinter getPrinter();
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.visitors;

public interface OutputGenerationContextVisitor {

public void visit(OutputGenerationContext context, int nGenerationParameter);
}

}
1 change: 1 addition & 0 deletions src/test/java/FizzBuzzTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ public void testFizzBuzz() throws IOException {
this.doFizzBuzz(TestConstants.INT_16,
TestConstants._1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14_FIZZ_BUZZ_16);
}

}
1 change: 1 addition & 0 deletions src/test/java/TestConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ private TestConstants() {
static final int INT_14 = 14;
static final int INT_15 = 15;
static final int INT_16 = 16;

}

0 comments on commit 22f391c

Please sign in to comment.