code: public <T> B set(Class<T> key, T value) {
          Object old = set(key.getName(), Objects.requireNonNull(value));
          if (old != null && old.getClass().isAssignableFrom(value.getClass())) {
              return (B) old;
          }
          return (B) this;
      }
docs: Sets an attribute, using {@code attribute.getClass()} as attribute
  <i>type</i>.
  
  @param value the attribute value, not null.
  @param key the attribute's key, not {@code null}
  @return this Builder, for chaining