Compare commits
No commits in common. "4de9e1865c3458a2cb41436dabb137c38d8a7740" and "946ac88480342b0b96205fcec182c75435953ecc" have entirely different histories.
4de9e1865c
...
946ac88480
@ -8,7 +8,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "space.kscience"
|
group = "space.kscience"
|
||||||
version = "0.7.2-dev-1"
|
version = "0.7.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
@ -7,7 +7,7 @@ import space.kscience.dataforge.names.asName
|
|||||||
import kotlin.properties.ReadWriteProperty
|
import kotlin.properties.ReadWriteProperty
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
public interface ReadOnlySpecification<out T : Any> : Described {
|
public interface ReadOnlySpecification<out T : Any>: Described {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read generic read-only meta with this [Specification] producing instance of desired type.
|
* Read generic read-only meta with this [Specification] producing instance of desired type.
|
||||||
@ -128,10 +128,3 @@ public fun <T : Scheme> MutableMeta.listOfSpec(
|
|||||||
setIndexed(name, value.map { it.toMeta() })
|
setIndexed(name, value.map { it.toMeta() })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@DFExperimental
|
|
||||||
public fun <T : Scheme> Scheme.listOfSpec(
|
|
||||||
spec: Specification<T>,
|
|
||||||
key: Name? = null,
|
|
||||||
): ReadWriteProperty<Any?, List<T>> = meta.listOfSpec(spec, key)
|
|
||||||
|
@ -16,10 +16,12 @@ public class Name(public val tokens: List<NameToken>) {
|
|||||||
|
|
||||||
override fun toString(): String = tokens.joinToString(separator = NAME_SEPARATOR) { it.toString() }
|
override fun toString(): String = tokens.joinToString(separator = NAME_SEPARATOR) { it.toString() }
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean = when (other) {
|
override fun equals(other: Any?): Boolean {
|
||||||
is Name -> this.tokens == other.tokens
|
return when (other) {
|
||||||
is NameToken -> this.length == 1 && this.tokens.first() == other
|
is Name -> this.tokens == other.tokens
|
||||||
else -> false
|
is NameToken -> this.length == 1 && this.tokens.first() == other
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val cachedHashCode = if (tokens.size == 1) {
|
private val cachedHashCode = if (tokens.size == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user