fuzzycsv.SpreadConfig.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fuzzy-csv Show documentation
Show all versions of fuzzy-csv Show documentation
A groovy/java tabular Data (from CSV,SQL,JSON) processing library that supports fuzzy column matching,tranformations/merging/querying etc
package fuzzycsv
import groovy.transform.CompileStatic
import groovy.transform.builder.Builder
import groovy.transform.builder.SimpleStrategy;
@Builder(builderStrategy = SimpleStrategy, prefix = 'with')
@CompileStatic
class SpreadConfig {
Object col
Closure nameGenFn = { Object col, Object value -> "${RecordFx.resolveName(col)}_${value}" }
String createName(def key) {
return nameGenFn.call(col, key)?.toString()
}
}