8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4801f75 commit 89d5708Copy full SHA for 89d5708
src/main/java/travelator/CampSites.kt
@@ -5,6 +5,9 @@ fun Iterable<CampSite>.sitesInRegion(
5
region: String
6
): Set<CampSite> =
7
filter { site ->
8
- site.countryCode == countryISO &&
9
- site.region.equals(region, ignoreCase = true)
10
- }.toSet()
+ site.isIn(countryISO, region)
+ }.toSet()
+
11
+fun CampSite.isIn(countryISO: String, region: String) =
12
+ countryCode == countryISO &&
13
+ this.region.equals(region, ignoreCase = true)
0 commit comments