code: private I_CmsFormatRestriction getMatchingFormat(CmsCroppingParamBean croppingParam, boolean forceByName) {
  
          I_CmsFormatRestriction result = null;
          if (forceByName && m_formats.containsKey(croppingParam.getFormatName())) {
              result = m_formats.get(croppingParam.getFormatName());
              if (!result.matchesCroppingParam(croppingParam)) {
                  result.adjustCroppingParam(croppingParam);
              }
              return result;
          }
          for (I_CmsFormatRestriction format : m_formats.values()) {
  
              if (format.matchesCroppingParam(croppingParam)) {
                  result = format;
                  if (format.getName().equals(croppingParam.getFormatName())) {
                      break;
                  }
              }
          }
          return result;
      }
docs: Checks the format restrictions if the match the giving cropping parameter.<p>
  
  @param croppingParam the cropping parameter
  @param forceByName force format match by name within cropping parameter
  
  @return the matching format restriction