0 Replies Latest reply on Oct 18, 2012 1:55 AM by GeoffC

    Generics in SimpleListProperty and SimpleObjectProperty

      Hi everyone,

      My understanding of generics may be shakier than I thought, but I was under the impression that I should be able to have:
      public abstract class GenericContainer<E, P extends javafx.beans.property.Property<E>> {}
      And then subclass as:
      1. public class ObjectContainer<E> extends GenericContainer<E, SimpleObjectProperty<E>> {}
      2. public class ListContainer<E> extends GenericContainer<E, SimpleListProperty<E>> {}
      Number 1 works fine, but number 2 gives me an error saying that the SimpleListProperty<E> is outside of the bounds of P. I've even tried using Property<ObservableList<E>>> in place of SimpleListProperty (which implements that interface) and it still fails.

      Can anyone offer advice as to where I'm going wrong?