BigDecimal step = sp.getStep(); if (step == null) { step = BigDecimal.ONE; BigDecimal minValue = sp.getMinValue(); if (minValue == null) { minValue = BigDecimal.ZERO; BigDecimal maxValue = sp.getMaxValue(); if (maxValue == null) { maxValue = BigDecimal.valueOf(100);
@Check public void checkSetpoints(final Setpoint sp) { BigDecimal _step = sp.getStep(); boolean _equals = Objects.equal(BigDecimal.ZERO, _step); if (_equals) { String _item = sp.getItem(); String _plus = ("Setpoint on item \'" + _item); String _plus_1 = (_plus + "\' has step size of 0"); this.error(_plus_1, SitemapPackage.Literals.SETPOINT.getEStructuralFeature(SitemapPackage.SETPOINT__STEP)); } if (((sp.getStep() != null) && (sp.getStep().compareTo(BigDecimal.ZERO) < 0))) { String _item_1 = sp.getItem(); String _plus_2 = ("Setpoint on item \'" + _item_1); String _plus_3 = (_plus_2 + "\' has negative step size"); this.error(_plus_3, SitemapPackage.Literals.SETPOINT.getEStructuralFeature(SitemapPackage.SETPOINT__STEP)); } if ((((sp.getMinValue() != null) && (sp.getMaxValue() != null)) && (sp.getMinValue().compareTo(sp.getMaxValue()) > 0))) { String _item_2 = sp.getItem(); String _plus_4 = ("Setpoint on item \'" + _item_2); String _plus_5 = (_plus_4 + "\' has larger minValue than maxValue"); this.error(_plus_5, SitemapPackage.Literals.SETPOINT.getEStructuralFeature(SitemapPackage.SETPOINT__MIN_VALUE)); } } }
bean.minValue = setpointWidget.getMinValue(); bean.maxValue = setpointWidget.getMaxValue(); bean.step = setpointWidget.getStep();
bean.minValue = setpointWidget.getMinValue(); bean.maxValue = setpointWidget.getMaxValue(); bean.step = setpointWidget.getStep();