/** * Creates and returns a BoundedSize for the given basis * using the specified lower and upper bounds. * * @param basis the base size * @param lowerBound the lower bound size * @param upperBound the upper bound size * @return a <code>BoundedSize</code> for the given basis and bounds * @throws NullPointerException if {@code basis} is {@code null}, * or if both {@code lowerBound} and {@code upperBound} are {@code null}. */ public static Size bounded(Size basis, Size lowerBound, Size upperBound) { return new BoundedSize(basis, lowerBound, upperBound); }
/** * Creates and returns a BoundedSize for the given basis * using the specified lower and upper bounds. * * @param basis the base size * @param lowerBound the lower bound size * @param upperBound the upper bound size * @return a {@code BoundedSize} for the given basis and bounds * @throws NullPointerException if {@code basis} is {@code null}, * or if both {@code lowerBound} and {@code upperBound} are {@code null}. */ public static Size bounded(Size basis, Size lowerBound, Size upperBound) { return new BoundedSize(basis, lowerBound, upperBound); }
/** * Creates and returns a <code>BoundedSize</code> for the given basis * using the specified lower and upper bounds. * * @param basis * the base size * @param lowerBound * the lower bound size * @param upperBound * the upper bound size * @return a <code>BoundedSize</code> for the given basis and bounds * @throws NullPointerException * if basis is null */ public static Size bounded(Size basis, Size lowerBound, Size upperBound) { return new BoundedSize(basis, lowerBound, upperBound); }
return new BoundedSize(size2, setMax ? null : size1, setMax ? size1 : null); return new BoundedSize(size1, setMax ? null : size2, setMax ? size2 : null);
return new BoundedSize(size2, setMax ? null : size1, setMax ? size1 : null); return new BoundedSize(size1, setMax ? null : size2, setMax ? size2 : null);
return new BoundedSize(size2, setMax ? null : size1, setMax ? size1 : null); return new BoundedSize(size1, setMax ? null : size2, setMax ? size2 : null);
&& ((lower == null) || (isConstant(lower))) && ((upper == null) || (isConstant(upper)))) { return new BoundedSize(basis, lower, upper);
return new BoundedSize(basis, lower, upper);