You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
435 B
Kotlin
13 lines
435 B
Kotlin
package net.cijber.pubgrub.packages
|
|
|
|
import net.cijber.pubgrub.stubs.PackageId
|
|
import net.cijber.pubgrub.stubs.Version
|
|
import net.cijber.pubgrub.version.VersionConstraint
|
|
|
|
data class PackageSelection<P : PackageId, V : Version<V>>(
|
|
val pkg: P,
|
|
val constraint: VersionConstraint<V>
|
|
) {
|
|
fun intersect(rhs: PackageSelection<P, V>): PackageSelection<P, V> =
|
|
PackageSelection(pkg, constraint.intersect(rhs.constraint))
|
|
} |