Sorting default jvm props and basic implementations

This commit is contained in:
Ilya Chernikov
2018-07-23 13:42:39 +02:00
parent fe2a11142e
commit 70ec004aaa
19 changed files with 110 additions and 133 deletions
@@ -26,6 +26,7 @@ open class ChainedPropertyBag internal constructor(private val parent: ChainedPr
constructor(vararg pairs: Pair<TypedKey<*>, Any?>) : this(null, pairs.asIterable())
fun cloneWithNewParent(newParent: ChainedPropertyBag?): ChainedPropertyBag = when {
this == newParent -> this
newParent == null -> this
parent == null -> createOptimized(newParent, data)
else -> createOptimized(parent.cloneWithNewParent(newParent), data)