code: public boolean isCapped() {
          CommandResult commandResult = getStats();
          Object cappedField = commandResult.get("capped");
          return cappedField != null && (cappedField.equals(1) || cappedField.equals(true));
      }
docs: Checks whether this collection is capped
  
  @return true if this is a capped collection
  @mongodb.driver.manual /core/capped-collections/#check-if-a-collection-is-capped Capped Collections