diff --git a/core/commonMain/src/implementations/immutableList/AbstractListIterator.kt b/core/commonMain/src/implementations/immutableList/AbstractListIterator.kt index a1410779..bc2ddca6 100644 --- a/core/commonMain/src/implementations/immutableList/AbstractListIterator.kt +++ b/core/commonMain/src/implementations/immutableList/AbstractListIterator.kt @@ -5,7 +5,7 @@ package kotlinx.collections.immutable.implementations.immutableList -internal abstract class AbstractListIterator(var index: Int, var size: Int) : ListIterator { +abstract class AbstractListIterator(var index: Int, var size: Int) : ListIterator { override fun hasNext(): Boolean { return index < size } @@ -22,19 +22,19 @@ internal abstract class AbstractListIterator(var index: Int, var size: In return index - 1 } - internal fun checkHasNext() { + fun checkHasNext() { if (!hasNext()) throw NoSuchElementException() } - internal fun checkHasPrevious() { + fun checkHasPrevious() { if (!hasPrevious()) throw NoSuchElementException() } } -internal class SingleElementListIterator(private val element: E, index: Int): AbstractListIterator(index, 1) { +class SingleElementListIterator(private val element: E, index: Int): AbstractListIterator(index, 1) { override fun next(): E { checkHasNext() index++ diff --git a/core/commonMain/src/implementations/immutableList/BufferIterator.kt b/core/commonMain/src/implementations/immutableList/BufferIterator.kt index 849b2fb7..1b02e877 100644 --- a/core/commonMain/src/implementations/immutableList/BufferIterator.kt +++ b/core/commonMain/src/implementations/immutableList/BufferIterator.kt @@ -5,7 +5,7 @@ package kotlinx.collections.immutable.implementations.immutableList -internal class BufferIterator( +class BufferIterator( private val buffer: Array, index: Int, size: Int diff --git a/core/commonMain/src/implementations/immutableList/PersistentVector.kt b/core/commonMain/src/implementations/immutableList/PersistentVector.kt index d902297c..4de1a651 100644 --- a/core/commonMain/src/implementations/immutableList/PersistentVector.kt +++ b/core/commonMain/src/implementations/immutableList/PersistentVector.kt @@ -21,7 +21,7 @@ import kotlinx.collections.immutable.mutate * @param rootShift specifies the height of the trie structure, so that `rootShift = (height - 1) * LOG_MAX_BUFFER_SIZE`; * elements in the [root] array are indexed with bits of the index starting from `rootShift` and until `rootShift + LOG_MAX_BUFFER_SIZE`. */ -internal class PersistentVector(private val root: Array, +class PersistentVector(private val root: Array, private val tail: Array, override val size: Int, private val rootShift: Int) : PersistentList, AbstractPersistentList() { diff --git a/core/commonMain/src/implementations/immutableList/PersistentVectorBuilder.kt b/core/commonMain/src/implementations/immutableList/PersistentVectorBuilder.kt index 6d788ab5..2f9c3b48 100644 --- a/core/commonMain/src/implementations/immutableList/PersistentVectorBuilder.kt +++ b/core/commonMain/src/implementations/immutableList/PersistentVectorBuilder.kt @@ -12,7 +12,7 @@ import kotlinx.collections.immutable.internal.MutabilityOwnership import kotlinx.collections.immutable.internal.assert import kotlinx.collections.immutable.internal.modCount -internal class PersistentVectorBuilder(private var vector: PersistentList, +class PersistentVectorBuilder(private var vector: PersistentList, private var vectorRoot: Array?, private var vectorTail: Array, internal var rootShift: Int) : AbstractMutableList(), PersistentList.Builder { diff --git a/core/commonMain/src/implementations/immutableList/PersistentVectorIterator.kt b/core/commonMain/src/implementations/immutableList/PersistentVectorIterator.kt index e9f213c0..8b463c04 100644 --- a/core/commonMain/src/implementations/immutableList/PersistentVectorIterator.kt +++ b/core/commonMain/src/implementations/immutableList/PersistentVectorIterator.kt @@ -5,7 +5,7 @@ package kotlinx.collections.immutable.implementations.immutableList -internal class PersistentVectorIterator(root: Array, +class PersistentVectorIterator(root: Array, private val tail: Array, index: Int, size: Int, diff --git a/core/commonMain/src/implementations/immutableList/PersistentVectorMutableIterator.kt b/core/commonMain/src/implementations/immutableList/PersistentVectorMutableIterator.kt index 8ffc6b14..dd7027b4 100644 --- a/core/commonMain/src/implementations/immutableList/PersistentVectorMutableIterator.kt +++ b/core/commonMain/src/implementations/immutableList/PersistentVectorMutableIterator.kt @@ -12,7 +12,7 @@ package kotlinx.collections.immutable.implementations.immutableList * [TrieIterator] is responsible for iterating over elements located at root, * whereas tail elements are iterated directly from this class. */ -internal class PersistentVectorMutableIterator( +class PersistentVectorMutableIterator( private val builder: PersistentVectorBuilder, index: Int ) : MutableListIterator, AbstractListIterator(index, builder.size) { diff --git a/core/commonMain/src/implementations/immutableList/SmallPersistentVector.kt b/core/commonMain/src/implementations/immutableList/SmallPersistentVector.kt index d34ea1f8..34ec511f 100644 --- a/core/commonMain/src/implementations/immutableList/SmallPersistentVector.kt +++ b/core/commonMain/src/implementations/immutableList/SmallPersistentVector.kt @@ -12,7 +12,7 @@ import kotlinx.collections.immutable.internal.ListImplementation.checkPositionIn import kotlinx.collections.immutable.internal.assert import kotlinx.collections.immutable.mutate -internal class SmallPersistentVector(private val buffer: Array) : ImmutableList, AbstractPersistentList() { +class SmallPersistentVector(private val buffer: Array) : ImmutableList, AbstractPersistentList() { init { assert(buffer.size <= MAX_BUFFER_SIZE) diff --git a/core/commonMain/src/implementations/immutableList/TrieIterator.kt b/core/commonMain/src/implementations/immutableList/TrieIterator.kt index 71328992..a93055ae 100644 --- a/core/commonMain/src/implementations/immutableList/TrieIterator.kt +++ b/core/commonMain/src/implementations/immutableList/TrieIterator.kt @@ -5,7 +5,7 @@ package kotlinx.collections.immutable.implementations.immutableList -internal class TrieIterator(root: Array, +class TrieIterator(root: Array, index: Int, size: Int, private var height: Int) : AbstractListIterator(index, size) { @@ -17,7 +17,7 @@ internal class TrieIterator(root: Array, fillPath(index - if (isInRightEdge) 1 else 0, 1) } - internal fun reset(root: Array, index: Int, size: Int, height: Int) { + fun reset(root: Array, index: Int, size: Int, height: Int) { this.index = index this.size = size this.height = height diff --git a/core/commonMain/src/implementations/immutableList/Utils.kt b/core/commonMain/src/implementations/immutableList/Utils.kt index 336f7549..9d1f562f 100644 --- a/core/commonMain/src/implementations/immutableList/Utils.kt +++ b/core/commonMain/src/implementations/immutableList/Utils.kt @@ -12,9 +12,9 @@ internal const val LOG_MAX_BUFFER_SIZE = 5 internal const val MAX_BUFFER_SIZE_MINUS_ONE = MAX_BUFFER_SIZE - 1 internal const val MUTABLE_BUFFER_SIZE = MAX_BUFFER_SIZE + 1 -internal class ObjectRef(var value: Any?) +class ObjectRef(var value: Any?) -internal fun persistentVectorOf(): PersistentList { +fun persistentVectorOf(): PersistentList { return SmallPersistentVector.EMPTY } diff --git a/core/commonMain/src/implementations/immutableMap/PersistentHashMap.kt b/core/commonMain/src/implementations/immutableMap/PersistentHashMap.kt index 332e5e40..0f87d7aa 100644 --- a/core/commonMain/src/implementations/immutableMap/PersistentHashMap.kt +++ b/core/commonMain/src/implementations/immutableMap/PersistentHashMap.kt @@ -12,7 +12,7 @@ import kotlinx.collections.immutable.implementations.persistentOrderedMap.Persis import kotlinx.collections.immutable.implementations.persistentOrderedMap.PersistentOrderedMapBuilder import kotlinx.collections.immutable.mutate -internal class PersistentHashMap(internal val node: TrieNode, +class PersistentHashMap(val node: TrieNode, override val size: Int): AbstractMap(), PersistentMap { override val keys: ImmutableSet @@ -34,9 +34,7 @@ internal class PersistentHashMap(internal val node: TrieNode, return PersistentHashMapEntries(this) } - // TODO: compiler bug: this bridge should be generated automatically - @PublishedApi - internal fun getEntries(): Set> { + fun getEntries(): Set> { return createEntries() } @@ -111,9 +109,9 @@ internal class PersistentHashMap(internal val node: TrieNode, */ override fun hashCode(): Int = super.hashCode() - internal companion object { + companion object { private val EMPTY = PersistentHashMap(TrieNode.EMPTY, 0) @Suppress("UNCHECKED_CAST") - internal fun emptyOf(): PersistentHashMap = EMPTY as PersistentHashMap + fun emptyOf(): PersistentHashMap = EMPTY as PersistentHashMap } } \ No newline at end of file diff --git a/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilder.kt b/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilder.kt index 983a319f..6fdddc7a 100644 --- a/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilder.kt +++ b/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilder.kt @@ -12,7 +12,7 @@ import kotlinx.collections.immutable.internal.DeltaCounter import kotlinx.collections.immutable.internal.MapImplementation import kotlinx.collections.immutable.internal.MutabilityOwnership -internal class PersistentHashMapBuilder(private var map: PersistentHashMap) : PersistentMap.Builder, AbstractMutableMap() { +class PersistentHashMapBuilder(private var map: PersistentHashMap) : PersistentMap.Builder, AbstractMutableMap() { internal var ownership = MutabilityOwnership() private set internal var node = map.node diff --git a/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentIterators.kt b/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentIterators.kt index 986369ca..a549b207 100644 --- a/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentIterators.kt +++ b/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentIterators.kt @@ -8,7 +8,7 @@ package kotlinx.collections.immutable.implementations.immutableMap import kotlinx.collections.immutable.internal.assert -internal class TrieNodeMutableEntriesIterator( +class TrieNodeMutableEntriesIterator( private val parentIterator: PersistentHashMapBuilderEntriesIterator ) : TrieNodeBaseIterator>() { @@ -35,7 +35,7 @@ private class MutableMapEntry( } -internal open class PersistentHashMapBuilderBaseIterator( +open class PersistentHashMapBuilderBaseIterator( private val builder: PersistentHashMapBuilder, path: Array> ) : MutableIterator, PersistentHashMapBaseIterator(builder.node, path) { @@ -125,7 +125,7 @@ internal open class PersistentHashMapBuilderBaseIterator( } } -internal class PersistentHashMapBuilderEntriesIterator( +class PersistentHashMapBuilderEntriesIterator( builder: PersistentHashMapBuilder ) : MutableIterator> { private val base = PersistentHashMapBuilderBaseIterator>( @@ -140,8 +140,8 @@ internal class PersistentHashMapBuilderEntriesIterator( fun setValue(key: K, newValue: V): Unit = base.setValue(key, newValue) } -internal class PersistentHashMapBuilderKeysIterator(builder: PersistentHashMapBuilder) +class PersistentHashMapBuilderKeysIterator(builder: PersistentHashMapBuilder) : PersistentHashMapBuilderBaseIterator(builder, Array(TRIE_MAX_HEIGHT + 1) { TrieNodeKeysIterator() }) -internal class PersistentHashMapBuilderValuesIterator(builder: PersistentHashMapBuilder) +class PersistentHashMapBuilderValuesIterator(builder: PersistentHashMapBuilder) : PersistentHashMapBuilderBaseIterator(builder, Array(TRIE_MAX_HEIGHT + 1) { TrieNodeValuesIterator() }) \ No newline at end of file diff --git a/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentViews.kt b/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentViews.kt index f84911f6..542c04c0 100644 --- a/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentViews.kt +++ b/core/commonMain/src/implementations/immutableMap/PersistentHashMapBuilderContentViews.kt @@ -8,7 +8,7 @@ package kotlinx.collections.immutable.implementations.immutableMap import kotlinx.collections.immutable.internal.MapImplementation // intermediate abstract class to workaround KT-43321 -internal abstract class AbstractMapBuilderEntries, K, V> : AbstractMutableSet() { +abstract class AbstractMapBuilderEntries, K, V> : AbstractMutableSet() { final override fun contains(element: E): Boolean { // TODO: Eliminate this check after KT-30016 gets fixed. @Suppress("USELESS_CAST") @@ -26,7 +26,7 @@ internal abstract class AbstractMapBuilderEntries, K, V> : A abstract fun removeEntry(element: Map.Entry): Boolean } -internal class PersistentHashMapBuilderEntries(private val builder: PersistentHashMapBuilder) +class PersistentHashMapBuilderEntries(private val builder: PersistentHashMapBuilder) : AbstractMapBuilderEntries, K, V>() { override fun add(element: MutableMap.MutableEntry): Boolean { throw UnsupportedOperationException() @@ -52,7 +52,7 @@ internal class PersistentHashMapBuilderEntries(private val builder: Persis } } -internal class PersistentHashMapBuilderKeys(private val builder: PersistentHashMapBuilder) : MutableSet, AbstractMutableSet() { +class PersistentHashMapBuilderKeys(private val builder: PersistentHashMapBuilder) : MutableSet, AbstractMutableSet() { override fun add(element: K): Boolean { throw UnsupportedOperationException() } @@ -81,7 +81,7 @@ internal class PersistentHashMapBuilderKeys(private val builder: Persisten } } -internal class PersistentHashMapBuilderValues(private val builder: PersistentHashMapBuilder) : MutableCollection, AbstractMutableCollection() { +class PersistentHashMapBuilderValues(private val builder: PersistentHashMapBuilder) : MutableCollection, AbstractMutableCollection() { override val size: Int get() = builder.size diff --git a/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentIterators.kt b/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentIterators.kt index 305dcce4..583f7a2c 100644 --- a/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentIterators.kt +++ b/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentIterators.kt @@ -10,7 +10,7 @@ import kotlin.js.JsName internal const val TRIE_MAX_HEIGHT = 7 -internal abstract class TrieNodeBaseIterator : Iterator { +abstract class TrieNodeBaseIterator : Iterator { protected var buffer = TrieNode.EMPTY.buffer private set private var dataSize = 0 @@ -62,7 +62,7 @@ internal abstract class TrieNodeBaseIterator : Iterator } } -internal class TrieNodeKeysIterator : TrieNodeBaseIterator() { +class TrieNodeKeysIterator : TrieNodeBaseIterator() { override fun next(): K { assert(hasNextKey()) index += 2 @@ -71,7 +71,7 @@ internal class TrieNodeKeysIterator : TrieNodeBaseIterator : TrieNodeBaseIterator() { +class TrieNodeValuesIterator : TrieNodeBaseIterator() { override fun next(): V { assert(hasNextKey()) index += 2 @@ -80,7 +80,7 @@ internal class TrieNodeValuesIterator : TrieNodeBaseIterator : TrieNodeBaseIterator>() { +class TrieNodeEntriesIterator : TrieNodeBaseIterator>() { override fun next(): Map.Entry { assert(hasNextKey()) index += 2 @@ -89,7 +89,7 @@ internal class TrieNodeEntriesIterator : TrieNodeBaseIterator(override val key: K, override val value: V) : Map.Entry { +open class MapEntry(override val key: K, override val value: V) : Map.Entry { override fun hashCode(): Int = key.hashCode() xor value.hashCode() override fun equals(other: Any?): Boolean = (other as? Map.Entry<*, *>)?.let { it.key == key && it.value == value } ?: false @@ -98,7 +98,7 @@ internal open class MapEntry(override val key: K, override val val } -internal abstract class PersistentHashMapBaseIterator( +abstract class PersistentHashMapBaseIterator( node: TrieNode, protected val path: Array> ) : Iterator { @@ -174,11 +174,11 @@ internal abstract class PersistentHashMapBaseIterator( } } -internal class PersistentHashMapEntriesIterator(node: TrieNode) +class PersistentHashMapEntriesIterator(node: TrieNode) : PersistentHashMapBaseIterator>(node, Array(TRIE_MAX_HEIGHT + 1) { TrieNodeEntriesIterator() }) -internal class PersistentHashMapKeysIterator(node: TrieNode) +class PersistentHashMapKeysIterator(node: TrieNode) : PersistentHashMapBaseIterator(node, Array(TRIE_MAX_HEIGHT + 1) { TrieNodeKeysIterator() }) -internal class PersistentHashMapValuesIterator(node: TrieNode) +class PersistentHashMapValuesIterator(node: TrieNode) : PersistentHashMapBaseIterator(node, Array(TRIE_MAX_HEIGHT + 1) { TrieNodeValuesIterator() }) diff --git a/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentViews.kt b/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentViews.kt index bf5f3be6..665396fd 100644 --- a/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentViews.kt +++ b/core/commonMain/src/implementations/immutableMap/PersistentHashMapContentViews.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.ImmutableCollection import kotlinx.collections.immutable.ImmutableSet import kotlinx.collections.immutable.internal.MapImplementation -internal class PersistentHashMapEntries(private val map: PersistentHashMap) : ImmutableSet>, AbstractSet>() { +class PersistentHashMapEntries(private val map: PersistentHashMap) : ImmutableSet>, AbstractSet>() { override val size: Int get() = map.size override fun contains(element: Map.Entry): Boolean { @@ -21,7 +21,7 @@ internal class PersistentHashMapEntries(private val map: PersistentHashMap } } -internal class PersistentHashMapKeys(private val map: PersistentHashMap) : ImmutableSet, AbstractSet() { +class PersistentHashMapKeys(private val map: PersistentHashMap) : ImmutableSet, AbstractSet() { override val size: Int get() = map.size @@ -34,7 +34,7 @@ internal class PersistentHashMapKeys(private val map: PersistentHashMap(private val map: PersistentHashMap) : ImmutableCollection, AbstractCollection() { +class PersistentHashMapValues(private val map: PersistentHashMap) : ImmutableCollection, AbstractCollection() { override val size: Int get() = map.size diff --git a/core/commonMain/src/implementations/immutableMap/TrieNode.kt b/core/commonMain/src/implementations/immutableMap/TrieNode.kt index 9fa6898b..e9e45835 100644 --- a/core/commonMain/src/implementations/immutableMap/TrieNode.kt +++ b/core/commonMain/src/implementations/immutableMap/TrieNode.kt @@ -70,7 +70,7 @@ private fun Array.removeNodeAtIndex(nodeIndex: Int): Array { -internal class TrieNode( +class TrieNode( private var dataMap: Int, private var nodeMap: Int, buffer: Array, @@ -78,7 +78,7 @@ internal class TrieNode( ) { constructor(dataMap: Int, nodeMap: Int, buffer: Array) : this(dataMap, nodeMap, buffer, null) - internal class ModificationResult(var node: TrieNode, val sizeDelta: Int) { + class ModificationResult(var node: TrieNode, val sizeDelta: Int) { inline fun replaceNode(operation: (TrieNode) -> TrieNode): ModificationResult = apply { node = operation(node) } } @@ -90,14 +90,14 @@ internal class TrieNode( private set /** Returns number of entries stored in this trie node (not counting subnodes) */ - internal fun entryCount(): Int = dataMap.countOneBits() + fun entryCount(): Int = dataMap.countOneBits() // here and later: // positionMask — an int in form 2^n, i.e. having the single bit set, whose ordinal is a logical position in buffer /** Returns true if the data bit map has the bit specified by [positionMask] set, indicating there's a data entry in the buffer at that position. */ - internal fun hasEntryAt(positionMask: Int): Boolean { + fun hasEntryAt(positionMask: Int): Boolean { return dataMap and positionMask != 0 } @@ -107,12 +107,12 @@ internal class TrieNode( } /** Gets the index in buffer of the data entry key corresponding to the position specified by [positionMask]. */ - internal fun entryKeyIndex(positionMask: Int): Int { + fun entryKeyIndex(positionMask: Int): Int { return ENTRY_SIZE * (dataMap and (positionMask - 1)).countOneBits() } /** Gets the index in buffer of the subtrie node entry corresponding to the position specified by [positionMask]. */ - internal fun nodeIndex(positionMask: Int): Int { + fun nodeIndex(positionMask: Int): Int { return buffer.size - 1 - (nodeMap and (positionMask - 1)).countOneBits() } @@ -129,7 +129,7 @@ internal class TrieNode( } /** Retrieves the buffer element at the given [nodeIndex] as subtrie node. */ - internal fun nodeAtIndex(nodeIndex: Int): TrieNode { + fun nodeAtIndex(nodeIndex: Int): TrieNode { @Suppress("UNCHECKED_CAST") return buffer[nodeIndex] as TrieNode } @@ -849,7 +849,7 @@ internal class TrieNode( return this } - internal fun equalsWith(that: TrieNode, equalityComparator: (V, V1) -> Boolean): Boolean { + fun equalsWith(that: TrieNode, equalityComparator: (V, V1) -> Boolean): Boolean { if (this === that) return true if (dataMap != that.dataMap || nodeMap != that.nodeMap) return false if (dataMap == 0 && nodeMap == 0) { // collision node @@ -877,7 +877,7 @@ internal class TrieNode( } // For testing trie structure - internal fun accept(visitor: (node: TrieNode, shift: Int, hash: Int, dataMap: Int, nodeMap: Int) -> Unit) { + fun accept(visitor: (node: TrieNode, shift: Int, hash: Int, dataMap: Int, nodeMap: Int) -> Unit) { accept(visitor, 0, 0) } @@ -902,7 +902,7 @@ internal class TrieNode( } } - internal companion object { - internal val EMPTY = TrieNode(0, 0, emptyArray()) + companion object { + val EMPTY = TrieNode(0, 0, emptyArray()) } } \ No newline at end of file diff --git a/core/commonMain/src/implementations/immutableSet/PersistentHashSet.kt b/core/commonMain/src/implementations/immutableSet/PersistentHashSet.kt index 8686b1ee..f9dac64b 100644 --- a/core/commonMain/src/implementations/immutableSet/PersistentHashSet.kt +++ b/core/commonMain/src/implementations/immutableSet/PersistentHashSet.kt @@ -8,7 +8,7 @@ package kotlinx.collections.immutable.implementations.immutableSet import kotlinx.collections.immutable.PersistentSet import kotlinx.collections.immutable.mutate -internal class PersistentHashSet(internal val node: TrieNode, +class PersistentHashSet(val node: TrieNode, override val size: Int): AbstractSet(), PersistentSet { override fun contains(element: E): Boolean { return node.contains(element.hashCode(), element, 0) @@ -64,8 +64,8 @@ internal class PersistentHashSet(internal val node: TrieNode, return PersistentHashSetBuilder(this) } - internal companion object { + companion object { private val EMPTY = PersistentHashSet(TrieNode.EMPTY, 0) - internal fun emptyOf(): PersistentSet = PersistentHashSet.EMPTY + fun emptyOf(): PersistentSet = PersistentHashSet.EMPTY } } diff --git a/core/commonMain/src/implementations/immutableSet/PersistentHashSetBuilder.kt b/core/commonMain/src/implementations/immutableSet/PersistentHashSetBuilder.kt index a9bce437..1bebd80c 100644 --- a/core/commonMain/src/implementations/immutableSet/PersistentHashSetBuilder.kt +++ b/core/commonMain/src/implementations/immutableSet/PersistentHashSetBuilder.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.PersistentSet import kotlinx.collections.immutable.internal.DeltaCounter import kotlinx.collections.immutable.internal.MutabilityOwnership -internal class PersistentHashSetBuilder(private var set: PersistentHashSet) : AbstractMutableSet(), PersistentSet.Builder { +class PersistentHashSetBuilder(private var set: PersistentHashSet) : AbstractMutableSet(), PersistentSet.Builder { internal var ownership = MutabilityOwnership() private set internal var node = set.node diff --git a/core/commonMain/src/implementations/immutableSet/PersistentHashSetIterator.kt b/core/commonMain/src/implementations/immutableSet/PersistentHashSetIterator.kt index a560f0ae..aaf5f21c 100644 --- a/core/commonMain/src/implementations/immutableSet/PersistentHashSetIterator.kt +++ b/core/commonMain/src/implementations/immutableSet/PersistentHashSetIterator.kt @@ -8,7 +8,7 @@ package kotlinx.collections.immutable.implementations.immutableSet import kotlinx.collections.immutable.internal.assert import kotlin.js.JsName -internal open class PersistentHashSetIterator(node: TrieNode) : Iterator { +open class PersistentHashSetIterator(node: TrieNode) : Iterator { protected val path = mutableListOf(TrieNodeIterator()) protected var pathLastIndex = 0 @JsName("_hasNext") @@ -78,7 +78,7 @@ internal open class PersistentHashSetIterator(node: TrieNode) : Iterator { +class TrieNodeIterator { private var buffer = TrieNode.EMPTY.buffer private var index = 0 diff --git a/core/commonMain/src/implementations/immutableSet/PersistentHashSetMutableIterator.kt b/core/commonMain/src/implementations/immutableSet/PersistentHashSetMutableIterator.kt index 23975e9c..21f72ffe 100644 --- a/core/commonMain/src/implementations/immutableSet/PersistentHashSetMutableIterator.kt +++ b/core/commonMain/src/implementations/immutableSet/PersistentHashSetMutableIterator.kt @@ -7,7 +7,7 @@ package kotlinx.collections.immutable.implementations.immutableSet import kotlinx.collections.immutable.internal.assert -internal class PersistentHashSetMutableIterator(private val builder: PersistentHashSetBuilder) +class PersistentHashSetMutableIterator(private val builder: PersistentHashSetBuilder) : PersistentHashSetIterator(builder.node), MutableIterator { private var lastIteratedElement: E? = null private var nextWasInvoked = false diff --git a/core/commonMain/src/implementations/immutableSet/TrieNode.kt b/core/commonMain/src/implementations/immutableSet/TrieNode.kt index 32ecca83..4b36f487 100644 --- a/core/commonMain/src/implementations/immutableSet/TrieNode.kt +++ b/core/commonMain/src/implementations/immutableSet/TrieNode.kt @@ -66,7 +66,7 @@ private inline fun Array.filterTo( return j } -internal class TrieNode( +class TrieNode( var bitmap: Int, var buffer: Array, var ownedBy: MutabilityOwnership? @@ -81,7 +81,7 @@ internal class TrieNode( return bitmap and positionMask == 0 } - internal fun indexOfCellAt(positionMask: Int): Int { + fun indexOfCellAt(positionMask: Int): Int { return (bitmap and (positionMask - 1)).countOneBits() } @@ -784,7 +784,7 @@ internal class TrieNode( return this } - internal companion object { - internal val EMPTY = TrieNode(0, emptyArray()) + companion object { + val EMPTY = TrieNode(0, emptyArray()) } } \ No newline at end of file diff --git a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMap.kt b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMap.kt index 94d25929..29f0de51 100644 --- a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMap.kt +++ b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMap.kt @@ -13,7 +13,7 @@ import kotlinx.collections.immutable.implementations.immutableMap.PersistentHash import kotlinx.collections.immutable.internal.EndOfChain import kotlinx.collections.immutable.mutate -internal class LinkedValue(val value: V, val previous: Any?, val next: Any?) { +class LinkedValue(val value: V, val previous: Any?, val next: Any?) { /** Constructs LinkedValue for a new single entry */ constructor(value: V) : this(value, EndOfChain, EndOfChain) /** Constructs LinkedValue for a new last entry */ @@ -27,10 +27,10 @@ internal class LinkedValue(val value: V, val previous: Any?, val next: Any?) val hasPrevious get() = previous !== EndOfChain } -internal class PersistentOrderedMap( - internal val firstKey: Any?, - internal val lastKey: Any?, - internal val hashMap: PersistentHashMap> +class PersistentOrderedMap( + val firstKey: Any?, + val lastKey: Any?, + val hashMap: PersistentHashMap> ) : AbstractMap(), PersistentMap { override val size: Int get() = hashMap.size @@ -54,9 +54,7 @@ internal class PersistentOrderedMap( return PersistentOrderedMapEntries(this) } - // TODO: compiler bug: this bridge should be generated automatically - @PublishedApi - internal fun getEntries(): Set> { + fun getEntries(): Set> { return createEntries() } @@ -164,9 +162,9 @@ internal class PersistentOrderedMap( */ override fun hashCode(): Int = super.hashCode() - internal companion object { + companion object { private val EMPTY = PersistentOrderedMap(EndOfChain, EndOfChain, PersistentHashMap.emptyOf()) @Suppress("UNCHECKED_CAST") - internal fun emptyOf(): PersistentOrderedMap = EMPTY as PersistentOrderedMap + fun emptyOf(): PersistentOrderedMap = EMPTY as PersistentOrderedMap } } \ No newline at end of file diff --git a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilder.kt b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilder.kt index b39fb9b4..afd2baf9 100644 --- a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilder.kt +++ b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilder.kt @@ -12,8 +12,8 @@ import kotlinx.collections.immutable.internal.EndOfChain import kotlinx.collections.immutable.internal.MapImplementation import kotlinx.collections.immutable.internal.assert -internal class PersistentOrderedMapBuilder(private var map: PersistentOrderedMap) : AbstractMutableMap(), PersistentMap.Builder { - internal var firstKey = map.firstKey +class PersistentOrderedMapBuilder(private var map: PersistentOrderedMap) : AbstractMutableMap(), PersistentMap.Builder { + internal var firstKey = map.firstKey private set private var lastKey = map.lastKey diff --git a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentIterators.kt b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentIterators.kt index 78c359ef..4503d755 100644 --- a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentIterators.kt +++ b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentIterators.kt @@ -8,7 +8,7 @@ package kotlinx.collections.immutable.implementations.persistentOrderedMap import kotlinx.collections.immutable.implementations.immutableMap.MapEntry import kotlinx.collections.immutable.internal.EndOfChain -internal open class PersistentOrderedMapBuilderLinksIterator( +open class PersistentOrderedMapBuilderLinksIterator( private var nextKey: Any?, internal val builder: PersistentOrderedMapBuilder ) : MutableIterator> { @@ -61,7 +61,7 @@ internal open class PersistentOrderedMapBuilderLinksIterator( } } -internal class PersistentOrderedMapBuilderEntriesIterator(map: PersistentOrderedMapBuilder): MutableIterator> { +class PersistentOrderedMapBuilderEntriesIterator(map: PersistentOrderedMapBuilder): MutableIterator> { private val internal = PersistentOrderedMapBuilderLinksIterator(map.firstKey, map) override fun hasNext(): Boolean { @@ -93,7 +93,7 @@ private class MutableMapEntry(private val mutableMap: MutableMap(map: PersistentOrderedMapBuilder): MutableIterator { +class PersistentOrderedMapBuilderKeysIterator(map: PersistentOrderedMapBuilder): MutableIterator { private val internal = PersistentOrderedMapBuilderLinksIterator(map.firstKey, map) override fun hasNext(): Boolean { @@ -111,7 +111,7 @@ internal class PersistentOrderedMapBuilderKeysIterator(map: Persis } } -internal class PersistentOrderedMapBuilderValuesIterator(map: PersistentOrderedMapBuilder): MutableIterator { +class PersistentOrderedMapBuilderValuesIterator(map: PersistentOrderedMapBuilder): MutableIterator { private val internal = PersistentOrderedMapBuilderLinksIterator(map.firstKey, map) override fun hasNext(): Boolean { diff --git a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentViews.kt b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentViews.kt index 2763943a..50820762 100644 --- a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentViews.kt +++ b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapBuilderContentViews.kt @@ -8,7 +8,7 @@ package kotlinx.collections.immutable.implementations.persistentOrderedMap import kotlinx.collections.immutable.implementations.immutableMap.AbstractMapBuilderEntries import kotlinx.collections.immutable.internal.MapImplementation -internal class PersistentOrderedMapBuilderEntries(private val builder: PersistentOrderedMapBuilder) +class PersistentOrderedMapBuilderEntries(private val builder: PersistentOrderedMapBuilder) : AbstractMapBuilderEntries, K, V>() { override fun add(element: MutableMap.MutableEntry): Boolean { throw UnsupportedOperationException() @@ -34,7 +34,7 @@ internal class PersistentOrderedMapBuilderEntries(private val builder: Per } } -internal class PersistentOrderedMapBuilderKeys(private val builder: PersistentOrderedMapBuilder) : MutableSet, AbstractMutableSet() { +class PersistentOrderedMapBuilderKeys(private val builder: PersistentOrderedMapBuilder) : MutableSet, AbstractMutableSet() { override fun add(element: K): Boolean { throw UnsupportedOperationException() } @@ -63,7 +63,7 @@ internal class PersistentOrderedMapBuilderKeys(private val builder: Persis } } -internal class PersistentOrderedMapBuilderValues(private val builder: PersistentOrderedMapBuilder) : MutableCollection, AbstractMutableCollection() { +class PersistentOrderedMapBuilderValues(private val builder: PersistentOrderedMapBuilder) : MutableCollection, AbstractMutableCollection() { override val size: Int get() = builder.size diff --git a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentIterators.kt b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentIterators.kt index e09aef40..c86ca4ff 100644 --- a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentIterators.kt +++ b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentIterators.kt @@ -7,7 +7,7 @@ package kotlinx.collections.immutable.implementations.persistentOrderedMap import kotlinx.collections.immutable.implementations.immutableMap.MapEntry -internal open class PersistentOrderedMapLinksIterator( +open class PersistentOrderedMapLinksIterator( internal var nextKey: Any?, private val hashMap: Map> ) : Iterator> { @@ -32,7 +32,7 @@ internal open class PersistentOrderedMapLinksIterator( } -internal class PersistentOrderedMapEntriesIterator(map: PersistentOrderedMap) : Iterator> { +class PersistentOrderedMapEntriesIterator(map: PersistentOrderedMap) : Iterator> { private val internal = PersistentOrderedMapLinksIterator(map.firstKey, map.hashMap) override fun hasNext(): Boolean { @@ -47,7 +47,7 @@ internal class PersistentOrderedMapEntriesIterator(map: Persistent } } -internal class PersistentOrderedMapKeysIterator(map: PersistentOrderedMap) : Iterator { +class PersistentOrderedMapKeysIterator(map: PersistentOrderedMap) : Iterator { private val internal = PersistentOrderedMapLinksIterator(map.firstKey, map.hashMap) override fun hasNext(): Boolean { @@ -62,7 +62,7 @@ internal class PersistentOrderedMapKeysIterator(map: PersistentOrd } } -internal class PersistentOrderedMapValuesIterator(map: PersistentOrderedMap) : Iterator { +class PersistentOrderedMapValuesIterator(map: PersistentOrderedMap) : Iterator { private val internal = PersistentOrderedMapLinksIterator(map.firstKey, map.hashMap) override fun hasNext(): Boolean { diff --git a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentViews.kt b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentViews.kt index 358ad15c..4d1c590e 100644 --- a/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentViews.kt +++ b/core/commonMain/src/implementations/persistentOrderedMap/PersistentOrderedMapContentViews.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.ImmutableCollection import kotlinx.collections.immutable.ImmutableSet import kotlinx.collections.immutable.internal.MapImplementation -internal class PersistentOrderedMapEntries(private val map: PersistentOrderedMap) : ImmutableSet>, AbstractSet>() { +class PersistentOrderedMapEntries(private val map: PersistentOrderedMap) : ImmutableSet>, AbstractSet>() { override val size: Int get() = map.size override fun contains(element: Map.Entry): Boolean { @@ -21,7 +21,7 @@ internal class PersistentOrderedMapEntries(private val map: PersistentOrde } } -internal class PersistentOrderedMapKeys(private val map: PersistentOrderedMap) : ImmutableSet, AbstractSet() { +class PersistentOrderedMapKeys(private val map: PersistentOrderedMap) : ImmutableSet, AbstractSet() { override val size: Int get() = map.size @@ -34,7 +34,7 @@ internal class PersistentOrderedMapKeys(private val map: PersistentOrdered } } -internal class PersistentOrderedMapValues(private val map: PersistentOrderedMap) : ImmutableCollection, AbstractCollection() { +class PersistentOrderedMapValues(private val map: PersistentOrderedMap) : ImmutableCollection, AbstractCollection() { override val size: Int get() = map.size diff --git a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSet.kt b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSet.kt index a1f5dc1a..ff664cd0 100644 --- a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSet.kt +++ b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSet.kt @@ -10,7 +10,7 @@ import kotlinx.collections.immutable.implementations.immutableMap.PersistentHash import kotlinx.collections.immutable.internal.EndOfChain import kotlinx.collections.immutable.mutate -internal class Links(val previous: Any?, val next: Any?) { +class Links(val previous: Any?, val next: Any?) { /** Constructs Links for a new single element */ constructor() : this(EndOfChain, EndOfChain) /** Constructs Links for a new last element */ @@ -23,10 +23,10 @@ internal class Links(val previous: Any?, val next: Any?) { val hasPrevious get() = previous !== EndOfChain } -internal class PersistentOrderedSet( - internal val firstElement: Any?, - internal val lastElement: Any?, - internal val hashMap: PersistentHashMap +class PersistentOrderedSet( + val firstElement: Any?, + val lastElement: Any?, + val hashMap: PersistentHashMap ) : AbstractSet(), PersistentSet { override val size: Int get() = hashMap.size @@ -123,8 +123,8 @@ internal class PersistentOrderedSet( */ override fun hashCode(): Int = super.hashCode() - internal companion object { + companion object { private val EMPTY = PersistentOrderedSet(EndOfChain, EndOfChain, PersistentHashMap.emptyOf()) - internal fun emptyOf(): PersistentSet = EMPTY + fun emptyOf(): PersistentSet = EMPTY } } diff --git a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetBuilder.kt b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetBuilder.kt index 352a9576..9a7351d2 100644 --- a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetBuilder.kt +++ b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetBuilder.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.PersistentSet import kotlinx.collections.immutable.internal.EndOfChain import kotlinx.collections.immutable.internal.assert -internal class PersistentOrderedSetBuilder(private var set: PersistentOrderedSet) : AbstractMutableSet(), PersistentSet.Builder { +class PersistentOrderedSetBuilder(private var set: PersistentOrderedSet) : AbstractMutableSet(), PersistentSet.Builder { internal var firstElement = set.firstElement private var lastElement = set.lastElement internal val hashMapBuilder = set.hashMap.builder() diff --git a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetIterator.kt b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetIterator.kt index 093349ce..0ca30d90 100644 --- a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetIterator.kt +++ b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetIterator.kt @@ -5,8 +5,8 @@ package kotlinx.collections.immutable.implementations.persistentOrderedSet -internal open class PersistentOrderedSetIterator(private var nextElement: Any?, - internal val map: Map) : Iterator { +open class PersistentOrderedSetIterator(private var nextElement: Any?, + internal val map: Map) : Iterator { internal var index = 0 override fun hasNext(): Boolean { diff --git a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetMutableIterator.kt b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetMutableIterator.kt index 5285cc0c..983a024f 100644 --- a/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetMutableIterator.kt +++ b/core/commonMain/src/implementations/persistentOrderedSet/PersistentOrderedSetMutableIterator.kt @@ -5,7 +5,7 @@ package kotlinx.collections.immutable.implementations.persistentOrderedSet -internal class PersistentOrderedSetMutableIterator(private val builder: PersistentOrderedSetBuilder) +class PersistentOrderedSetMutableIterator(private val builder: PersistentOrderedSetBuilder) : PersistentOrderedSetIterator(builder.firstElement, builder.hashMapBuilder), MutableIterator { private var lastIteratedElement: E? = null diff --git a/core/commonMain/src/internal/EndOfChain.kt b/core/commonMain/src/internal/EndOfChain.kt index 6d7f3447..204eacb8 100644 --- a/core/commonMain/src/internal/EndOfChain.kt +++ b/core/commonMain/src/internal/EndOfChain.kt @@ -5,4 +5,4 @@ package kotlinx.collections.immutable.internal -internal object EndOfChain \ No newline at end of file +object EndOfChain \ No newline at end of file diff --git a/core/commonMain/src/internal/ForEachOneBit.kt b/core/commonMain/src/internal/ForEachOneBit.kt index 017fe997..af7b9515 100644 --- a/core/commonMain/src/internal/ForEachOneBit.kt +++ b/core/commonMain/src/internal/ForEachOneBit.kt @@ -6,7 +6,7 @@ package kotlinx.collections.immutable.internal // 'iterate' all the bits set to one in a given integer, in the form of one-bit masks -internal inline fun Int.forEachOneBit(body: (mask: Int, index: Int) -> Unit) { +inline fun Int.forEachOneBit(body: (mask: Int, index: Int) -> Unit) { var mask = this var index = 0 while (mask != 0) { diff --git a/core/commonMain/src/internal/ListImplementation.kt b/core/commonMain/src/internal/ListImplementation.kt index b4bb7711..8a406d97 100644 --- a/core/commonMain/src/internal/ListImplementation.kt +++ b/core/commonMain/src/internal/ListImplementation.kt @@ -7,24 +7,24 @@ package kotlinx.collections.immutable.internal import kotlin.jvm.JvmStatic -internal object ListImplementation { +object ListImplementation { @JvmStatic - internal fun checkElementIndex(index: Int, size: Int) { + fun checkElementIndex(index: Int, size: Int) { if (index < 0 || index >= size) { throw IndexOutOfBoundsException("index: $index, size: $size") } } @JvmStatic - internal fun checkPositionIndex(index: Int, size: Int) { + fun checkPositionIndex(index: Int, size: Int) { if (index < 0 || index > size) { throw IndexOutOfBoundsException("index: $index, size: $size") } } @JvmStatic - internal fun checkRangeIndexes(fromIndex: Int, toIndex: Int, size: Int) { + fun checkRangeIndexes(fromIndex: Int, toIndex: Int, size: Int) { if (fromIndex < 0 || toIndex > size) { throw IndexOutOfBoundsException("fromIndex: $fromIndex, toIndex: $toIndex, size: $size") } @@ -34,7 +34,7 @@ internal object ListImplementation { } @JvmStatic - internal fun orderedHashCode(c: Collection<*>): Int { + fun orderedHashCode(c: Collection<*>): Int { var hashCode = 1 for (e in c) { hashCode = 31 * hashCode + (e?.hashCode() ?: 0) @@ -43,7 +43,7 @@ internal object ListImplementation { } @JvmStatic - internal fun orderedEquals(c: Collection<*>, other: Collection<*>): Boolean { + fun orderedEquals(c: Collection<*>, other: Collection<*>): Boolean { if (c.size != other.size) return false val otherIterator = other.iterator() diff --git a/core/commonMain/src/internal/MapImplementation.kt b/core/commonMain/src/internal/MapImplementation.kt index 32b5ba70..1336fc4b 100644 --- a/core/commonMain/src/internal/MapImplementation.kt +++ b/core/commonMain/src/internal/MapImplementation.kt @@ -8,19 +8,19 @@ package kotlinx.collections.immutable.internal /** * This should not be needed after KT-30016 and KT-45673 are fixed */ -internal object MapImplementation { - internal fun containsEntry(map: Map, element: Map.Entry): Boolean { +object MapImplementation { + fun containsEntry(map: Map, element: Map.Entry): Boolean { @Suppress("USELESS_CAST") if ((element as Any?) !is Map.Entry<*, *>) return false return map[element.key]?.let { candidate -> candidate == element.value } ?: (element.value == null && map.containsKey(element.key)) } - internal fun equals(thisMap: Map, otherMap: Map<*, *>): Boolean { + fun equals(thisMap: Map, otherMap: Map<*, *>): Boolean { require(thisMap.size == otherMap.size) @Suppress("UNCHECKED_CAST") return (otherMap as Map).all { entry -> containsEntry(thisMap, entry) } } - internal fun hashCode(map: Map): Int = map.entries.hashCode() + fun hashCode(map: Map): Int = map.entries.hashCode() } diff --git a/core/commonMain/src/internal/MutabilityOwnership.kt b/core/commonMain/src/internal/MutabilityOwnership.kt index 8050c0db..cd129372 100644 --- a/core/commonMain/src/internal/MutabilityOwnership.kt +++ b/core/commonMain/src/internal/MutabilityOwnership.kt @@ -10,4 +10,4 @@ package kotlinx.collections.immutable.internal * * Used to mark persistent data structures, that are owned by a collection builder and can be mutated by it. */ -internal class MutabilityOwnership \ No newline at end of file +class MutabilityOwnership \ No newline at end of file diff --git a/core/commonMain/src/internal/MutableCounter.kt b/core/commonMain/src/internal/MutableCounter.kt index ae79bee7..fcfc371e 100644 --- a/core/commonMain/src/internal/MutableCounter.kt +++ b/core/commonMain/src/internal/MutableCounter.kt @@ -5,6 +5,6 @@ package kotlinx.collections.immutable.internal -internal data class DeltaCounter(var count: Int = 0) { +data class DeltaCounter(var count: Int = 0) { operator fun plusAssign(that: Int) { count += that } } \ No newline at end of file diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000..0ef908fc --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,4 @@ +jdk: + - openjdk11 +install: + - ./gradlew publishJvmPublicationToMavenLocal