-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bda925
commit 9bd8227
Showing
100 changed files
with
359,202 additions
and
28 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
functional-programming-exercises/src/com/example/exercises/ContinentCityPair.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.example.exercises; | ||
|
||
import java.util.Optional; | ||
|
||
import com.example.domain.City; | ||
|
||
/** | ||
* @author Binnur Kurt <[email protected]> | ||
*/ | ||
public record ContinentCityPair(String continent,City city) implements Comparable<ContinentCityPair>{ | ||
|
||
@Override | ||
public int compareTo(ContinentCityPair other) { | ||
return this.city.getPopulation()-other.city.getPopulation(); | ||
} | ||
|
||
public static void printEntry(String continent,Optional<ContinentCityPair> pair) { | ||
System.out.printf("%s: %s\n",continent,pair.get().city()); | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
functional-programming-exercises/src/com/example/exercises/CountryCityCountPair.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.example.exercises; | ||
|
||
import com.example.domain.Country; | ||
|
||
/** | ||
* @author Binnur Kurt <[email protected]> | ||
*/ | ||
public record CountryCityCountPair(Country country,int count) { } |
9 changes: 9 additions & 0 deletions
9
functional-programming-exercises/src/com/example/exercises/DirectorGenrePair.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.example.exercises; | ||
|
||
import com.example.domain.Director; | ||
import com.example.domain.Genre; | ||
|
||
/** | ||
* @author Binnur Kurt <[email protected]> | ||
*/ | ||
record DirectorGenrePair(Director director,Genre genre) { } |
11 changes: 11 additions & 0 deletions
11
functional-programming-exercises/src/com/example/exercises/DirectorGenresPair.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.example.exercises; | ||
|
||
import java.util.List; | ||
|
||
import com.example.domain.Director; | ||
import com.example.domain.Genre; | ||
|
||
/** | ||
* @author Binnur Kurt <[email protected]> | ||
*/ | ||
record DirectorGenresPair(Director director,List<Genre> genres) { } |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.