use of com.genericworkflownodes.util.ranges.IntegerRangeExtractor in project GenericKnimeNodes by genericworkflownodes.
the class ParamHandler method handleIntList.
/**
* Convert the current element into a IntegerListParameter.
*
* @param paramName
* The name of the Parameter
* @param attributes
* Attributes of the Parameter.
*/
private void handleIntList(String paramName, Attributes attributes) {
m_currentParameter = new IntegerListParameter(paramName, new ArrayList<Integer>());
// check for restrictions
String restrs = attributes.getValue(ATTR_RESTRICTIONS);
if (restrs != null) {
((IntegerListParameter) m_currentParameter).setLowerBound(new IntegerRangeExtractor().getLowerBound(restrs));
((IntegerListParameter) m_currentParameter).setUpperBound(new IntegerRangeExtractor().getUpperBound(restrs));
}
}
use of com.genericworkflownodes.util.ranges.IntegerRangeExtractor in project GenericKnimeNodes by genericworkflownodes.
the class ParamHandler method handleIntType.
/**
* Convert the current element into a IntegerParameter.
*
* @param paramName
* The name of the Parameter
* @param paramValue
* The value of the Parameter as given in the param file.
* @param attributes
* Attributes of the Parameter.
*/
private void handleIntType(final String paramName, final String paramValue, Attributes attributes) {
m_currentParameter = new IntegerParameter(paramName, paramValue);
// check for restrictions
String restrictions = attributes.getValue(ATTR_RESTRICTIONS);
if (restrictions != null) {
((IntegerParameter) m_currentParameter).setLowerBound(new IntegerRangeExtractor().getLowerBound(restrictions));
((IntegerParameter) m_currentParameter).setUpperBound(new IntegerRangeExtractor().getUpperBound(restrictions));
}
}
Aggregations