File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed
src/main/java/com/kylecorry/trailsensecore/domain/weather Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ apply plugin: 'kotlin-android'
4
4
apply plugin : ' kotlin-android-extensions'
5
5
6
6
group = ' com.kylecorry'
7
- version = ' 2.3.1 '
7
+ version = ' 2.4.0 '
8
8
9
9
android {
10
10
compileSdkVersion 30
11
11
12
12
defaultConfig {
13
13
minSdkVersion 23
14
14
targetSdkVersion 30
15
- versionCode 33
15
+ versionCode 34
16
16
versionName version
17
17
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
18
18
}
Original file line number Diff line number Diff line change @@ -137,4 +137,16 @@ class WeatherService : IWeatherService {
137
137
override fun getCloudHeightRange (height : CloudHeight , location : Coordinate ): HeightRange {
138
138
return cloudService.getCloudHeightRange(height, location)
139
139
}
140
+
141
+ override fun getCloudsByShape (shape : CloudShape ): List <CloudType > {
142
+ return cloudService.getCloudsByShape(shape)
143
+ }
144
+
145
+ override fun getCloudsByHeight (height : CloudHeight ): List <CloudType > {
146
+ return cloudService.getCloudsByHeight(height)
147
+ }
148
+
149
+ override fun getCloudsByColor (color : CloudColor ): List <CloudType > {
150
+ return cloudService.getCloudsByColor(color)
151
+ }
140
152
}
Original file line number Diff line number Diff line change @@ -58,4 +58,16 @@ class CloudService : ICloudService {
58
58
}
59
59
}
60
60
61
+ override fun getCloudsByShape (shape : CloudShape ): List <CloudType > {
62
+ return CloudType .values().filter { it.shape.contains(shape) }
63
+ }
64
+
65
+ override fun getCloudsByHeight (height : CloudHeight ): List <CloudType > {
66
+ return CloudType .values().filter { it.height.contains(height) }
67
+ }
68
+
69
+ override fun getCloudsByColor (color : CloudColor ): List <CloudType > {
70
+ return CloudType .values().filter { it.colors.contains(color) }
71
+ }
72
+
61
73
}
Original file line number Diff line number Diff line change @@ -5,4 +5,7 @@ import com.kylecorry.trailsensecore.domain.geo.Coordinate
5
5
interface ICloudService {
6
6
fun getCloudPrecipitation (cloud : CloudType ): CloudWeather
7
7
fun getCloudHeightRange (height : CloudHeight , location : Coordinate ): HeightRange
8
+ fun getCloudsByShape (shape : CloudShape ): List <CloudType >
9
+ fun getCloudsByHeight (height : CloudHeight ): List <CloudType >
10
+ fun getCloudsByColor (color : CloudColor ): List <CloudType >
8
11
}
You can’t perform that action at this time.
0 commit comments