code: static BasicTag convert(Tag t) {
      return (t instanceof BasicTag) ? (BasicTag) t : new BasicTag(t.key(), t.value());
    }
docs: Convert an arbitrary implementation of {@link Tag} to BasicTag. When
  used as part of an id this is needed to ensure correct behavior. Alternative
  implementations will likely vary the hashCode/equals causing ids that should
  be equivalent to not match as expected.