title: Can I have a list property that accepts subtypes?
body: <p>In my app I have a certain data item, based on an abstract base datatype, with concrete subtypes of that.  </p>
  
  <p>I have a UI component that displays a list of these data items. I want to expose a ListProperty of the base datatype (which has all the common fields I want to display), and be able to bind it to other components that provide lists of the specific subtypes.  But I can't seem to get the lists to be compatible.</p>
  
  <p>Code sample that illustrates the problem:</p>
  
  <pre><code>import javafx.beans.property.ListProperty;
  import javafx.beans.property.SimpleListProperty;
  
  public class GenericTest
  {
      static class BaseClass {}
      static class SubClass extends BaseClass {}
  
      ListProperty&lt;SubClass&gt; sourceList = new SimpleListProperty&lt;&gt;();
      ListProperty&lt;? extends BaseClass&gt; observingList = new SimpleListProperty&lt;&gt;();
  
      {
          observingList.bind( sourceList );
      }
  
  }
  </code></pre>
  
  <p>I get a compilation error on the bind() call - incompatible types. I thought I understood Java generics, but obviously not.</p>
  
  <p>Is it possible to bind list properties with generics in the mix, or should I look for an alternative solution?</p>