use of org.knime.core.node.defaultnodesettings.SettingsModelIntegerBounded in project knime-core by knime.
the class NaiveBayesLearnerNodeModel method validateSettings.
/**
* {@inheritDoc}
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
final SettingsModelString colName = m_classifyColumnName.createCloneWithValidatedValue(settings);
if (colName == null || colName.getStringValue().trim().length() < 1) {
throw new InvalidSettingsException("No class column selected");
}
final SettingsModelIntegerBounded maxNoOfNomVals = m_maxNoOfNominalVals.createCloneWithValidatedValue(settings);
if (maxNoOfNomVals.getIntValue() < 0) {
throw new InvalidSettingsException("Maximum number of unique " + "nominal values should be a positive number");
}
}
Aggregations