Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/src/main/java/com/gdgcatania/kotlinbootcamp/City.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.gdgcatania.kotlinbootcamp

/**
* Created by AntoninoMarco on 19/11/2017.
*/

class City constructor(id : Long = 0, val name : String, val coordinate: Coordinate)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anche queste potrebbero essere data class


class Coordinate constructor(val longitude : Float, val latitude : Float) {
fun isNorthEmisphere(latitude : Float) = latitude >= 0
}
19 changes: 19 additions & 0 deletions app/src/main/java/com/gdgcatania/kotlinbootcamp/Weather.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.gdgcatania.kotlinbootcamp

/**
* Created by AntoninoMarco on 19/11/2017.
*/

class Weather constructor(id : Int, main : String, description : String, icon : String)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queste potrebbero essere tutte data class


class Main constructor(temp : Float, pressure : Integer, temp_min : Float, temp_max : Float, sea_level : Integer, grnd_level : Integer)

class Wind constructor(speed : Float, deg : Float)

class Clouds constructor(all : Integer)

class Rain constructor(lastThreeHours : Integer)

class Snow constructor(lastThreeHours : Integer)

class Sys constructor(type : Integer, id : Integer, message : Integer, country : String, sunrire : Long, sunset :Long)