code: public static void checkIfMatch(final String ifMatch, final EntityTag etag) {
          if (ifMatch == null) {
              return;
          }
          final Set<String> items = stream(ifMatch.split(",")).map(String::trim).collect(toSet());
          if (items.contains("*")) {
              return;
          }
          try {
              if (etag.isWeak() || items.stream().map(EntityTag::valueOf).noneMatch(isEqual(etag))) {
                      throw new ClientErrorException(status(PRECONDITION_FAILED).build());
              }
          } catch (final IllegalArgumentException ex) {
              throw new BadRequestException(ex);
          }
      }
docs: Check for a conditional operation.
  @param ifMatch the If-Match header
  @param etag the resource etag