All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.nacular.doodle.utils.TreeSet.kt Maven / Gradle / Ivy

package io.nacular.doodle.utils

/**
 * Created by Nicholas Eddy on 4/11/18.
 */
public expect class TreeSet: Set {
    public constructor(comparator: Comparator)
    public constructor(comparator: Comparator, elements: Collection)

    // From Set
    override val size: Int
    override fun isEmpty(): Boolean
    override fun contains(element: E): Boolean
    override fun containsAll(elements: Collection): Boolean
    override fun iterator(): Iterator

    public companion object {
        public operator fun > invoke(): TreeSet
        public operator fun > invoke(elements: Collection): TreeSet
    }
}

public expect class MutableTreeSet: MutableSet {
    public constructor(comparator: Comparator)
    public constructor(comparator: Comparator, elements: Collection)

    // From Set
    override val size: Int
    override fun isEmpty(): Boolean
    override fun contains(element: E): Boolean
    override fun containsAll(elements: Collection): Boolean

    // From MutableSet
    override fun iterator(): MutableIterator
    override fun add(element: E): Boolean
    override fun remove(element: E): Boolean
    override fun addAll(elements: Collection): Boolean
    override fun removeAll(elements: Collection): Boolean
    override fun retainAll(elements: Collection): Boolean
    override fun clear()

    public companion object {
        public operator fun > invoke(): MutableTreeSet
        public operator fun > invoke(elements: Collection): MutableTreeSet
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy