Ruckus
04/26/2018, 5:52 PMabstract class MyClass {
var myVar = 1.0
protected set
}
Can you make the setter of myVar
public in a derived class without making myVar
open?rook
04/26/2018, 6:12 PMRuckus
04/26/2018, 6:17 PMbjonnh
04/26/2018, 8:41 PMbjonnh
04/26/2018, 8:41 PMbjonnh
04/26/2018, 8:41 PMAndreas Sinz
04/26/2018, 8:44 PMbjonnh
04/26/2018, 8:45 PMbjonnh
04/26/2018, 8:47 PMAndreas Sinz
04/26/2018, 8:50 PMkarelpeeters
04/26/2018, 8:57 PMopen get
doesn't work.Ruckus
04/26/2018, 9:01 PMgroostav
04/26/2018, 11:02 PMdata class ViewObject(val amount: Double, val unit: TimeUnit)
and I want to convert it into a java.time.Duration
class and back again, and I would like to make this class non-nullable where the default is something like ViewObject(Double.INFINITY, TimeUnit.MINUTES)
where the presentation logic would represent "infinity" as empty string...
maybe ill just use null 😕napperley
04/27/2018, 6:39 AMpawel.urban
04/27/2018, 7:23 AMvar someAttribute: AttributeClass
get() = delegate.someAttribute
set(value) {
delegate.someAttribute = value
}
robstoll
04/27/2018, 7:24 AMby
?pawel.urban
04/27/2018, 7:24 AMpawel.urban
04/27/2018, 7:25 AMpawel.urban
04/27/2018, 7:26 AMby
requires a delegate and the attriute itself it not a delegatediesieben07
04/27/2018, 7:28 AMclass MyClass : MyInterface by delegate
).
However if that is not the case, you have do it the way you are doing currently I think.pawel.urban
04/27/2018, 7:29 AMpawel.urban
04/27/2018, 7:29 AMkarelpeeters
04/27/2018, 7:30 AMjanvladimirmostert
04/27/2018, 9:33 AMprint
or println
?Paul Woitaschek
04/27/2018, 9:45 AMPaul Woitaschek
04/27/2018, 9:45 AMjanvladimirmostert
04/27/2018, 9:54 AMprint("blah")
now I want it to print kotlin.io.print("$date - $message"
) every time somone calls regular print or printlndiesieben07
04/27/2018, 9:56 AMSystem.setOut
.diesieben07
04/27/2018, 9:56 AM