net.maizegenetics.dna.map.GenomicFeatureList.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tassel6 Show documentation
Show all versions of tassel6 Show documentation
TASSEL 6 is a software package to evaluate traits association. Feature Tables are at the heart of the package where, a feature is a range of positions or a single position. Row in the that table are taxon.
package net.maizegenetics.dna.map
import com.google.common.collect.ImmutableList
/**
* @author Terry Casstevens
* Created November 07, 2018
*
* This is a list of genomic factors paired with it's weight
*/
class GenomicFeatureList private constructor(private val factors: ImmutableList) : List by factors {
// TODO("Sort")
// TODO("Validate Order")
class Builder {
val builder = ImmutableList.builder()
fun add(factor: GenomicFeature) {
builder.add(factor)
}
fun addAll(factors: List) {
factors.forEach { add(it) }
}
fun build(): GenomicFeatureList {
return GenomicFeatureList(builder.build())
}
}
}