File tree Expand file tree Collapse file tree
lib/src/main/kotlin/com/openmeteo/apix/elevation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import kotlinx.serialization.Transient
77import java.net.URL
88
99open class Elevation (
10- val latitude : Iterable <Float >,
11- val longitude : Iterable <Float >,
10+ val latitude : Collection <Float >,
11+ val longitude : Collection <Float >,
1212 context : URL = Companion .context,
1313) : Endpoint(context) {
1414
@@ -17,7 +17,7 @@ open class Elevation(
1717 }
1818
1919 constructor (
20- coordinates: Pair <Iterable <Float >, Iterable <Float >>,
20+ coordinates: Pair <Collection <Float >, Collection <Float >>,
2121 context: URL = Companion .context,
2222 ) : this (
2323 coordinates.first,
@@ -33,6 +33,10 @@ open class Elevation(
3333 context,
3434 )
3535
36+ init {
37+ require(longitude.size == latitude.size)
38+ }
39+
3640 @Transient
3741 val coordinates get() =
3842 latitude.zip(longitude)
You can’t perform that action at this time.
0 commit comments