code: public static boolean shouldInline(Map<String, ? extends Attachment> attachments,
                                  PushAttachmentsInline inlinePreference,
                                  int minRevPos) {
          boolean shouldInline = true;
          // first figure out if any attachments don't want to be inlined
          for (Attachment att : attachments.values()) {
              SavedAttachment savedAtt = (SavedAttachment) att;
              if (savedAtt.revpos > minRevPos && !savedAtt.shouldInline(inlinePreference)) {
                  // if at least one attachments doesn't want to be inlined, then they all go into
                  // the multipart writer
                  shouldInline = false;
                  break;
              }
          }
          return shouldInline;
      }
docs: <p>
  Determine whether to upload attachments inline or separately via multipart/related.
  </p>
  <p>
  If at least one attachment is determined as not being inlined according to the strategy
  described by {@code inlinePreference}, then all attachments are sent via multipart/related.
  Otherwise, all attachments are send as inline base64.
  </p>
  
  @param attachments list of {@code Attachment}s to be considered for inlining.
  @param inlinePreference strategy to decide whether to upload attachments inline or separately.
  @param minRevPos generation number of most recent ancestor on the remote database. If the
  {@code revpos} value of a given attachment is greater than {@code minRevPos},
  then it is newer than the version on the remote database and must be sent,
  and therefore considered in the calculation of the return value.
  Otherwise, a stub will be sent and the attachment is not considered in the
  calculation of the return value.
  
  @return a boolean flag determining whether all attachments should be sent inline or not.