public static <T extends Content> org.jdom.filter2.Filter<T> toFilter2(final Filter<T> filter) {
    return new org.jdom.filter2.AbstractFilter<T>() {
      @Override
      public T filter(Object content) {
        //noinspection unchecked
        return filter.matches(content) ? (T)content : null;
      }
    };
  }
public static <T extends Content> org.jdom.filter2.Filter<T> toFilter2(final Filter<T> filter)