Issue #253: grade school improvements#271
Merged
matthewmorgan merged 5 commits intoJan 30, 2017
Merged
Conversation
….db() function, added numberOfStudents functions and renamed the sort function to studentsByGradeAlphabetical. Added test to check that grade() gets the students in the order they were inserted. Removed getsStudentsInAGrade() test as what it was testing was already being covered by the tests before it.
…broader range of implementations. Currently users are hindered into return the type HashMap<Integer, List<String>. This test update will check the order of any Map that maps to any Collection value type. This opens the doors for more possible types of solutions.
…3/grade_school_improvements This takes the more generic approach I introduced in the previous commit and applies it to the re-structuring and new tests introduced by frida/ImproveGradeSchool I've opted to remove the @test public void gradeReturnsStudentsInTheOrderTheyWereInserted() I've noticed some users have prefered to do the sorting on add. Please discuss, and if this is something that should be enforced I will add it back in. Making sure add order is maintained.
Contributor
|
@davethomas11 looks like we have some merge conflicts due to merging previous PRs. Would you mind resolving them and pushing again, or LMK and I can help with that. |
Contributor
Author
|
@matthewmorgan Resolved the conflicts |
|
|
||
| Map schoolStudents = school.studentsByGradeAlphabetical(); | ||
| for (Map.Entry<?, Matcher> entry : sortedStudents.entrySet()) { | ||
|
|
Contributor
There was a problem hiding this comment.
I like this! Took me a minute to figure out what was going on, honestly.
Contributor
|
@davethomas11 Thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.