Skip to content

Commit 247157f

Browse files
committed
House keep on the packages.
1 parent 9587d51 commit 247157f

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

src/test/java/com/github/streams/learn/functional_interfaces/F_ComparatorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import static org.junit.jupiter.api.Assertions.assertFalse;
44

5-
import com.github.streams.learn.functional_interfaces.ignore.models.Person;
65
import java.util.Comparator;
76
import java.util.function.IntBinaryOperator;
87
import org.junit.jupiter.api.Assertions;
@@ -11,6 +10,8 @@
1110

1211
class F_ComparatorTest {
1312

13+
public record Person(String name, String lastName, int age) {}
14+
1415
final Person ayman = new Person("Ayman", "Khan", 51);
1516
final Person rod = new Person("Rod", "Stewart", 71);
1617
final Person paul = new Person("Paul", "McCartney", 74);

src/test/java/com/github/streams/learn/functional_interfaces/ignore/models/Person.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/test/java/com/github/streams/learn/functional_interfaces/solutions/B_Comparators.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import static org.junit.jupiter.api.Assertions.assertFalse;
44
import static org.junit.jupiter.api.Assertions.assertTrue;
55

6-
import com.github.streams.learn.functional_interfaces.ignore.models.Person;
76
import java.util.Comparator;
87
import java.util.function.IntBinaryOperator;
98
import org.junit.jupiter.api.Test;
@@ -13,7 +12,9 @@
1312
* Some of the exercises use a Person class, which is a simple POJO containing a last projectName,
1413
* first projectName, and age, with the obvious constructors and getters.
1514
*/
16-
public class B_Comparators {
15+
class B_Comparators {
16+
17+
public record Person(String name, String lastName, int age) {}
1718

1819
final Person michael = new Person("Michael", "Jackson", 51);
1920
final Person rod = new Person("Rod", "Stewart", 71);
@@ -26,7 +27,7 @@ public class B_Comparators {
2627
* letters) is greater than TWO (three letters)
2728
*/
2829
@Test
29-
public void comparator01() {
30+
void comparator01() {
3031
// TODO//Comparator<String> compareByLength = null;
3132
// BEGINREMOVE
3233
Comparator<String> compareByLength = Comparator.comparing(String::length);
@@ -49,7 +50,7 @@ public void comparator01() {
4950
* same, then use the alphabetical order.
5051
*/
5152
@Test
52-
public void comparator02() {
53+
void comparator02() {
5354
// TODO//Comparator<String> compareByLengthThenAlphabetical = null;
5455
// BEGINREMOVE
5556
Comparator<String> compareByLengthThenAlphabetical =
@@ -73,7 +74,7 @@ public void comparator02() {
7374

7475
/** Write a Comparator that compares instances of Person using their lastName. */
7576
@Test
76-
public void comparator03() {
77+
void comparator03() {
7778
// TODO//Comparator<Person> comparebyLastName = null;
7879
// BEGINREMOVE
7980
Comparator<Person> comparebyLastName = Comparator.comparing(Person::lastName);

src/test/java/module-info.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
requires static lombok;
66

77
// LEARN
8-
opens com.github.streams.learn.ignore.inprogress to
9-
org.junit.platform.commons;
108
opens com.github.streams.learn.functional_interfaces to
119
org.junit.platform.commons;
1210
opens com.github.streams.learn.functional_interfaces.solutions to

0 commit comments

Comments
 (0)