code: private Size parseOldBoundedSize(String token, boolean setMax) {
          int semicolonIndex = token.indexOf(';');
          String sizeToken1 = token.substring(4, semicolonIndex);
          String sizeToken2 = token.substring(semicolonIndex + 1, token.length() - 1);
  
          Size size1 = parseAtomicSize(sizeToken1);
          Size size2 = parseAtomicSize(sizeToken2);
  
          // Check valid combinations and set min or max.
          if (isConstant(size1)) {
              if (size2 instanceof Sizes.ComponentSize) {
                  return new BoundedSize(size2, setMax ? null : size1,
                          setMax ? size1 : null);
              }
              throw new IllegalArgumentException(
                      "Bounded sizes must not be both constants.");
          }
          if (isConstant(size2)) {
              return new BoundedSize(size1, setMax ? null : size2,
                      setMax ? size2 : null);
          }
          throw new IllegalArgumentException(
                  "Bounded sizes must not be both logical.");
      }
docs: Parses an encoded compound size and sets the size fields. The compound size has format:
  max(&lt;atomic size&gt;;&lt;atomic size2&gt;) | min(&lt;atomic size1&gt;;&lt;atomic
  size2&gt;) One of the two atomic sizes must be a logical size, the other must be a size
  constant.
  
  @param token a token for a bounded size, e.g. "max(50dlu; pref)"
  @param setMax if true we set a maximum size, otherwise a minimum size
  @return a Size that represents the parse result