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.

14 lines
665 B
Kotlin

package net.cijber.pubgrub.version
import net.cijber.pubgrub.stubs.Version
class VersionEmpty<V : Version<V>> : VersionConstraint<V> {
override val isAny: Boolean = false
override val isEmpty: Boolean = true
override fun allows(version: V): Boolean = false
override fun allowsAll(rhs: VersionConstraint<V>): Boolean = rhs.isEmpty
override fun allowsAny(rhs: VersionConstraint<V>): Boolean = false
override fun union(rhs: VersionConstraint<V>): VersionConstraint<V> = rhs
override fun intersect(rhs: VersionConstraint<V>): VersionConstraint<V> = this
override fun difference(rhs: VersionConstraint<V>): VersionConstraint<V> = this
}