use of org.talend.dataquality.domain.RangeRestriction in project tdq-studio-se by Talend.
the class DomainHelper method createStringRangeRestriction.
public static RangeRestriction createStringRangeRestriction(String min, String max) {
RangeRestriction rangeRestriction = DOMAIN.createRangeRestriction();
rangeRestriction.setLowerValue(createStringValue(null, min));
rangeRestriction.setUpperValue(createStringValue(null, max));
return rangeRestriction;
}
use of org.talend.dataquality.domain.RangeRestriction in project tdq-studio-se by Talend.
the class DomainHelper method getMinBinValue.
/**
* Method "getMinBinValue".
*
* @param domain
* @return the lower value of the first bin.
*/
public static double getMinBinValue(Domain domain) {
EList<RangeRestriction> ranges = domain.getRanges();
if (ranges.isEmpty()) {
// $NON-NLS-1$
throw new IllegalArgumentException(Messages.getString("DomainHelper.NoRangeMin", domain.getName()));
}
RangeRestriction r1 = ranges.get(0);
if (r1 == null) {
// $NON-NLS-1$
throw new IllegalArgumentException(Messages.getString("DomainHelper.FirstRangeMin", domain.getName()));
}
return getRealValue(r1.getLowerValue());
}
Aggregations