private <T> T getFirst(Function<? super XmlNSDescriptorImpl, ? extends T> function) {
    for (XmlNSDescriptorImpl descriptor : myDescriptors) {
      T t = function.apply(descriptor);
      if (t != null) return t;
    }
    return null;
  }
private <T> T getFirst(Function<? super XmlNSDescriptorImpl, ? extends T> function)