fix kotlin import (#7028)
This commit is contained in:
parent
c3ec2ab7c4
commit
41eb61026b
@ -9,19 +9,3 @@ interface Document {
|
|||||||
|
|
||||||
fun getType() = "document"
|
fun getType() = "document"
|
||||||
}
|
}
|
||||||
|
|
||||||
class TextDocument : Document {
|
|
||||||
override fun getType() = "text"
|
|
||||||
|
|
||||||
fun transformList(list : List<Number>) : List<Number> {
|
|
||||||
return list.filter { n -> n.toInt() > 1 }
|
|
||||||
}
|
|
||||||
|
|
||||||
fun transformListInverseWildcards(list : List<@JvmSuppressWildcards Number>) : List<@JvmWildcard Number> {
|
|
||||||
return list.filter { n -> n.toInt() > 1 }
|
|
||||||
}
|
|
||||||
|
|
||||||
var list : List<@JvmWildcard Any> = ArrayList()
|
|
||||||
}
|
|
||||||
|
|
||||||
class XmlDocument(d : Document) : Document by d
|
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.baeldung.jvmannotations
|
||||||
|
|
||||||
|
import java.util.*
|
||||||
|
class TextDocument : Document {
|
||||||
|
override fun getType() = "text"
|
||||||
|
|
||||||
|
fun transformList(list : List<Number>) : List<Number> {
|
||||||
|
return list.filter { n -> n.toInt() > 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun transformListInverseWildcards(list : List<@JvmSuppressWildcards Number>) : List<@JvmWildcard Number> {
|
||||||
|
return list.filter { n -> n.toInt() > 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
var list : List<@JvmWildcard Any> = ArrayList()
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
package com.baeldung.jvmannotations
|
||||||
|
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class XmlDocument(d : Document) : Document by d
|
@ -3,6 +3,8 @@ package com.baeldung.range
|
|||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
|
import com.baeldung.jvmannotations.*;
|
||||||
|
|
||||||
class DocumentTest {
|
class DocumentTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user