Class BaseSolution
java.lang.Object
com.expedient.adventofcodejade.BaseSolution
- Direct Known Subclasses:
SolutionDay1,SolutionDay1,SolutionDay10,SolutionDay11,SolutionDay12,SolutionDay12,SolutionDay13,SolutionDay14,SolutionDay15,SolutionDay16,SolutionDay17,SolutionDay18,SolutionDay19,SolutionDay2,SolutionDay2,SolutionDay20,SolutionDay21,SolutionDay22,SolutionDay23,SolutionDay24,SolutionDay3,SolutionDay3,SolutionDay4,SolutionDay4,SolutionDay5,SolutionDay5,SolutionDay6,SolutionDay7,SolutionDay8,SolutionDay9
Base class for all Solutions. Provides input, sample input, and methods to run part one and part
two.
-
Constructor Summary
ConstructorsConstructorDescriptionBaseSolution(PuzzleInput input, PuzzleInput sampleInputOne, PuzzleInput sampleInputTwo) -
Method Summary
Modifier and TypeMethodDescriptiongetInput(boolean test, boolean partOne) Returns either the input or sample input depending on whether this is a test runabstract ObjectpartOne(PuzzleInput input) Logic for part one of the solution.abstract ObjectpartTwo(PuzzleInput input) Logic for part two of the solution.voidrun(boolean test, boolean metrics) Runs parts one and two of the solution, and prints the results.
-
Constructor Details
-
BaseSolution
-
-
Method Details
-
getInput
Returns either the input or sample input depending on whether this is a test run- Parameters:
test- whether this is a test runpartOne- whether this is for part one- Returns:
- the corresponding input
-
run
public void run(boolean test, boolean metrics) Runs parts one and two of the solution, and prints the results.- Parameters:
test- whether to use test inputs
-
partOne
Logic for part one of the solution. Must be overridden when implementing the solution.- Parameters:
input- the PuzzleInput to be used for the solution- Returns:
- output of this part of the solution
-
partTwo
Logic for part two of the solution. Must be overridden when implementing the solution.- Parameters:
input- the PuzzleInput to be used for the solution- Returns:
- output of this part of the solution
-