Add ability to remove a feature by key
This commit is contained in:
parent
dab9784089
commit
7623e5f622
@ -10,7 +10,7 @@ val kmathVersion: String by extra("0.3.1-dev-10")
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "center.sciprog"
|
group = "center.sciprog"
|
||||||
version = "0.2.2-dev-5"
|
version = "0.2.2-dev-6"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
@ -51,6 +51,10 @@ public data class FeatureGroup<T : Any>(
|
|||||||
return FeatureRef(safeId, this)
|
return FeatureRef(safeId, this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public fun removeFeature(id: String) {
|
||||||
|
featureMap.remove(id)
|
||||||
|
}
|
||||||
|
|
||||||
// public fun <F : Feature<T>> feature(id: FeatureId<F>, feature: F): FeatureId<F> = feature(id.id, feature)
|
// public fun <F : Feature<T>> feature(id: FeatureId<F>, feature: F): FeatureId<F> = feature(id.id, feature)
|
||||||
|
|
||||||
public val features: Collection<Feature<T>> get() = featureMap.values.sortedByDescending { it.z }
|
public val features: Collection<Feature<T>> get() = featureMap.values.sortedByDescending { it.z }
|
||||||
|
Loading…
Reference in New Issue
Block a user