/** * Creates a PropertyValue for a range of aadlreal with units. * * @throws IllegalArgumentException Thrown if minUnits, maxUnits, or deltaUnits is null, if * minUnits, maxUnits, and deltaUnits are not of the same UnitType, or if min is greater than * max. */ public static RangeValue createRealRangeValue( double min, UnitLiteral minUnits, double max, UnitLiteral maxUnits, double delta, UnitLiteral deltaUnits) throws IllegalArgumentException { RangeValue newPropertyValue = createRealRangeValue(min, minUnits, max, maxUnits); if (deltaUnits == null) throw new IllegalArgumentException("deltaUnits cannot be null."); if (!minUnits.eContainer().equals(deltaUnits.eContainer())) throw new IllegalArgumentException( "minUnits, maxUnits, and deltaUnits are not of the same type."); newPropertyValue.setDelta(createRealValue(delta, deltaUnits)); return newPropertyValue; }
/** * Creates a PropertyValue for a range of aadlreal. * * @throws IllegalArgumentException Thrown if min is greater than max. */ public static RangeValue createRealRangeValue(double min, double max, double delta) throws IllegalArgumentException { RangeValue newPropertyValue = createRealRangeValue(min, max); newPropertyValue.setDelta(createRealValue(delta)); return newPropertyValue; }
/** * Creates a PropertyValue for a range of aadlinteger. * * @throws IllegalArgumentException Thrown if min is greater than max. */ public static RangeValue createIntegerRangeValue(long min, long max, long delta) throws IllegalArgumentException { RangeValue newPropertyValue = createIntegerRangeValue(min, max); newPropertyValue.setDelta(createIntegerValue(delta)); return newPropertyValue; }