code: public Collection findCollection(final String title, final String contentType) {
          for (final Object element : collections) {
              final Collection col = (Collection) element;
              if (title != null && col.accepts(contentType)) {
                  return col;
              } else if (col.accepts(contentType)) {
                  return col;
              }
          }
          return null;
      }
docs: Find collection by title and/or content-type.
  
  @param title Title or null to match all titles.
  @param contentType Content-type or null to match all content-types.
  @return First Collection that matches title and/or content-type.