Cleanup: rename parameters to match overriden method (in private implementations).
Remove some redundancy.
This commit is contained in:
@@ -93,7 +93,7 @@ private class MutableMapWithDefaultImpl<K, V>(public override val map: MutableMa
|
||||
|
||||
override fun put(key: K, value: V): V? = map.put(key, value)
|
||||
override fun remove(key: K): V? = map.remove(key)
|
||||
override fun putAll(m: Map<out K, V>) = map.putAll(m)
|
||||
override fun putAll(from: Map<out K, V>) = map.putAll(from)
|
||||
override fun clear() = map.clear()
|
||||
|
||||
override fun getOrImplicitDefault(key: K): V = map.getOrElseNullable(key, { default(key) })
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package kotlin.io
|
||||
|
||||
import java.io.*
|
||||
import java.nio.charset.Charset
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
|
||||
@@ -114,7 +114,7 @@ private inline fun List<String>.reindent(resultSizeEstimate: Int, indentAddFunct
|
||||
if ((index == 0 || index == lastIndex) && value.isBlank())
|
||||
null
|
||||
else
|
||||
indentCutFunction(value)?.let { cutted -> indentAddFunction(cutted) } ?: value
|
||||
indentCutFunction(value)?.let(indentAddFunction) ?: value
|
||||
}
|
||||
.joinTo(StringBuilder(resultSizeEstimate), "\n")
|
||||
.toString()
|
||||
|
||||
@@ -234,8 +234,8 @@ private class MatcherMatchResult(private val matcher: Matcher, private val input
|
||||
override val groups: MatchGroupCollection = object : MatchGroupCollection {
|
||||
override val size: Int get() = matchResult.groupCount() + 1
|
||||
override fun isEmpty(): Boolean = false
|
||||
override fun contains(o: MatchGroup?): Boolean = this.any({ it == o })
|
||||
override fun containsAll(c: Collection<MatchGroup?>): Boolean = c.all({contains(it)})
|
||||
override fun contains(element: MatchGroup?): Boolean = this.any { it == element }
|
||||
override fun containsAll(elements: Collection<MatchGroup?>): Boolean = elements.all { contains(it) }
|
||||
|
||||
override fun iterator(): Iterator<MatchGroup?> = indices.asSequence().map { this[it] }.iterator()
|
||||
override fun get(index: Int): MatchGroup? {
|
||||
|
||||
@@ -15,12 +15,12 @@ public interface Lazy<out T> {
|
||||
* Gets the lazily initialized value of the current Lazy instance.
|
||||
* Once the value was initialized it must not change during the rest of lifetime of this Lazy instance.
|
||||
*/
|
||||
public abstract val value: T
|
||||
public val value: T
|
||||
/**
|
||||
* Returns `true` if a value for this Lazy instance has been already initialized, and `false` otherwise.
|
||||
* Once this function has returned `true` it stays `true` for the rest of lifetime of this Lazy instance.
|
||||
*/
|
||||
public abstract fun isInitialized(): Boolean
|
||||
public fun isInitialized(): Boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user