public class ConfigHelpers extends Object
| Constructor and Description |
|---|
ConfigHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configure(LenskitConfiguration config,
groovy.lang.Closure<?> block)
Modify a configuration from a closure.
|
static LenskitConfiguration |
load(groovy.lang.Closure<?> block)
Load a LensKit configuration from a Groovy closure.
|
static LenskitConfiguration |
load(File script)
Load a LensKit configuration from a script file.
|
static LenskitConfiguration |
load(String script)
Deprecated.
Loading from Groovy source strings is confusing.
|
static LenskitConfiguration |
load(URL script)
Load a LensKit configuration from a script URL.
|
public static LenskitConfiguration load(groovy.lang.Closure<?> block) throws RecommenderConfigurationException
block - The block to evaluate. This block will be evaluated with a delegate providing
the LensKit DSL and the Closure.DELEGATE_FIRST resolution strategy.RecommenderConfigurationExceptionConfigurationLoader.load(groovy.lang.Closure)@Deprecated public static LenskitConfiguration load(String script) throws RecommenderConfigurationException
script - The script source text to evaluate.RecommenderConfigurationExceptionpublic static LenskitConfiguration load(File script) throws IOException, RecommenderConfigurationException
script - The script source file to evaluate.IOExceptionRecommenderConfigurationExceptionpublic static LenskitConfiguration load(URL script) throws IOException, RecommenderConfigurationException
script - The script source URL to evaluate.IOExceptionRecommenderConfigurationExceptionpublic static void configure(LenskitConfiguration config, @Nonnull groovy.lang.Closure<?> block) throws RecommenderConfigurationException
block - The block to evaluate. This block will be evaluated with a delegate providing
the LensKit DSL and the Closure.DELEGATE_FIRST resolution strategy.RecommenderConfigurationException