Add toString() to Any, fix all tests
#KT-4517 Fixed
This commit is contained in:
@@ -6,7 +6,7 @@ import java.util.ArrayList
|
||||
public class ChangeEvent(val source: Any, val name: String, val oldValue: Any?, val newValue: Any?) {
|
||||
var propogationId: Any? = null
|
||||
|
||||
public fun toString() : String = "ChangeEvent($name, $oldValue, $newValue)"
|
||||
override fun toString(): String = "ChangeEvent($name, $oldValue, $newValue)"
|
||||
}
|
||||
|
||||
public trait ChangeListener {
|
||||
|
||||
@@ -15,7 +15,7 @@ class StringTemplate(val values : Array<Any?>) {
|
||||
/**
|
||||
* Converts the template into a String
|
||||
*/
|
||||
public fun toString() : String {
|
||||
override fun toString() : String {
|
||||
val out = StringBuilder()
|
||||
forEach{ out.append(it) }
|
||||
return out.toString()
|
||||
@@ -93,7 +93,7 @@ public open class ToStringFormatter : Formatter {
|
||||
|
||||
var nullString : String = "null"
|
||||
|
||||
public open fun toString() : String = "ToStringFormatter"
|
||||
override fun toString() : String = "ToStringFormatter"
|
||||
|
||||
public override fun format(out : Appendable, value : Any?) {
|
||||
if (value == null) {
|
||||
@@ -121,7 +121,7 @@ public val defaultLocale : Locale = Locale.getDefault()
|
||||
*/
|
||||
public open class LocaleFormatter(val locale : Locale = defaultLocale) : ToStringFormatter() {
|
||||
|
||||
public override fun toString() : String = "LocaleFormatter{$locale}"
|
||||
override fun toString() : String = "LocaleFormatter{$locale}"
|
||||
|
||||
public var numberFormat : NumberFormat = NumberFormat.getInstance(locale)!!
|
||||
|
||||
@@ -151,7 +151,7 @@ public open class LocaleFormatter(val locale : Locale = defaultLocale) : ToStrin
|
||||
*/
|
||||
public class HtmlFormatter(locale : Locale = defaultLocale) : LocaleFormatter(locale) {
|
||||
|
||||
public override fun toString() : String = "HtmlFormatter{$locale}"
|
||||
override fun toString() : String = "HtmlFormatter{$locale}"
|
||||
|
||||
public override fun format(out : Appendable, value : Any?) {
|
||||
if (value is Node) {
|
||||
|
||||
Reference in New Issue
Block a user