0

I am reading javafx documentation, and didn't get what this definition means:

ObservableArray<T extends ObservableArray<T>>

I also read a very similar question about SomeClass<T extends Comparable<T>> (Java- The meaning of <T extends Comparable<T>>?) but in this case I got the idea because it is not a cyclical definition. Also read this question Cyclic generic dependenices that is a kind of "two-step" cyclic generics, but I didn't get the meaning as well. What this pattern A<B extends A<B>> is supposed to mean?

Thanks for your time.

LBald
  • 473
  • 2
  • 11
  • I think the easiest way to understand it is just that `T` here needs to be a type of ObservableArray. – markspace Feb 05 '20 at 14:07
  • Does this answer your question? [Java Enum definition](https://stackoverflow.com/questions/211143/java-enum-definition) – IlyaMuravjov Feb 07 '20 at 16:33
  • Related: [Is there a way to refer to the current type with a type variable?](https://stackoverflow.com/questions/7354740/is-there-a-way-to-refer-to-the-current-type-with-a-type-variable) – Mark Rotteveel Feb 07 '20 at 19:01
  • None of the duplicates answer the question, and I would argue that there is no point for JavaFX's `ObservableArray`'s type parameter to have a recursive bound. – newacct Feb 17 '20 at 17:18

0 Answers0