chriswatterston
09/06/2017, 2:35 PMalexsullivan114
09/06/2017, 3:35 PMalexsullivan114
09/06/2017, 3:35 PMbarrongineer
09/06/2017, 3:37 PMbarrongineer
09/06/2017, 3:38 PMjw
09/06/2017, 3:38 PMalexsullivan114
09/06/2017, 3:44 PMhinst
09/06/2017, 6:09 PMhinst
09/06/2017, 6:09 PMthis
from companion object?karelpeeters
09/06/2017, 6:10 PMMyClass.companionFunction()
. What you're looking for is nested classes.wintus
09/06/2017, 6:36 PMmanijshrestha
09/06/2017, 8:31 PMsealed class Vehicle {
var color: String = ""
var make: String = ""
}
data class SportsCar(val color: String, val make: String, val model: String): Vehicle
damian
09/06/2017, 8:34 PMcolor
and make
open
karelpeeters
09/06/2017, 8:35 PMequals
can't be correctly implemented with inheritance, tipsy
09/06/2017, 8:39 PMpublic class HttpHeader {
public static final String ACCEPT = "Accept";
public static final String ACCEPT_CHARSET = "Accept-Charset";
public static final String ACCEPT_ENCODING = "Accept-Encoding";
}
tipsy
09/06/2017, 8:39 PMkarelpeeters
09/06/2017, 8:45 PMRuckus
09/06/2017, 8:54 PM@file:JvmName("HttpHeader")
const val ACCEPT = "Accept"
const val ACCEPT_CHARSET = "Accept-Charset"
const val ACCEPT_ENCODING = "Accept-Encoding"
Can be used from Java as HttpHeader.ACCEPT
and can be used from Kotlin as ACCEPT
jw
09/06/2017, 8:55 PMconst
jw
09/06/2017, 8:55 PMjw
09/06/2017, 8:55 PMRuckus
09/06/2017, 8:55 PMtipsy
09/06/2017, 8:57 PMtipsy
09/06/2017, 8:57 PMddsoyka
09/06/2017, 10:15 PMMap<String, List<String>>
, how do I 'unwrap' that inner list to a Map<String, String>
, wherein each element of the inner list is paired to the correct key?Ruckus
09/06/2017, 10:17 PMRuckus
09/06/2017, 10:17 PMList<Map<String, String>>
?trevjones
09/06/2017, 10:17 PMList<Pair<String, String>>
trevjones
09/06/2017, 10:18 PMRuckus
09/06/2017, 10:18 PM