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

commonMain.com.dshatz.fuzzykat.diffutils.algorithms.SetUtils.kt Maven / Gradle / Ivy

The newest version!
package com.dshatz.fuzzykat.diffutils.algorithms

internal object SetUtils {

    fun  intersection(s1: Set, s2: Set): Set {

        val intersection = HashSet(s1)
        intersection.retainAll(s2)

        return intersection

    }

    fun  difference(s1: Set, s2: Set): Set {

        val difference = HashSet(s1)
        difference.removeAll(s2)

        return difference

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy