<div dir="auto"><div>Hello Brian,<div dir="auto"><br></div><div dir="auto">Thank you for your response!</div><div dir="auto"><br></div><div dir="auto">> F-bounds are weird-looking at first:</div><div dir="auto">> </div><div dir="auto">>      abstract class Enum<T extends Enum<T>> { ... }</div><div dir="auto">> </div><div dir="auto">> in part because it's not always obvious</div><div dir="auto">> what "T" means at first. We're used to</div><div dir="auto">> seeing type variables that represent</div><div dir="auto">> element types (List<T>), or result types</div><div dir="auto">> (Supplier<T>), but this T really means</div><div dir="auto">> "subclass".  If it were written</div><div dir="auto">> </div><div dir="auto">>      abstract class Enum<Subclass extends Enum<Subclass>></div><div dir="auto">> { Subclass[]</div><div dir="auto">values(); }</div><div dir="auto">> </div><div dir="auto">> it would already be clearer. </div><div dir="auto"><br></div>This clarified the F bounds fully, thank you. Thinking of a type parameter as a sort of subclass is something I never thought of before. I see how it applies and works here though.</div><div dir="auto"><br></div><div dir="auto">> You might first try writing it as<div dir="auto">> </div><div dir="auto">>      abstract class Enum<Subclass> { ... }</div><div dir="auto">> </div><div dir="auto">> but this permits extension in unexpected</div><div dir="auto">> ways:</div><div dir="auto">> </div><div dir="auto">>      class FooEnum extends Enum<String> { ... }</div><div dir="auto">> </div><div dir="auto">> You could try refining it as</div><div dir="auto">> </div><div dir="auto">>      abstract class Enum<Subclass extends Enum> { ... }</div><div dir="auto">> </div><div dir="auto">> but this still permits</div><div dir="auto">> </div><div dir="auto">>      class FooEnum extends Enum<BarEnum> { ... }</div><div dir="auto">> </div><div dir="auto">> What we're trying to express is that the</div><div dir="auto">> type argument of Enum *is* the class</div><div dir="auto">> being declared.  Which is where the</div><div dir="auto">> f-bound comes in:</div><div dir="auto">> </div><div dir="auto">>      abstract class Enum<Subclass </div><div dir="auto">>      extends Enum<Subclass>> { Subclass[]</div><div dir="auto">values(); }</div><div dir="auto">> </div><div dir="auto">> which can only be satisfied by a</div><div dir="auto">> declaration of the form</div><div dir="auto">> </div><div dir="auto">>      class X extends Enum<X> { ... }</div><div dir="auto"><br></div><div dir="auto">I had had a discussion with someone long ago [1], arguing over whether or not T extends Something<T> is meaningfully different from T extends Something<?>. I now see the difference. It communicates what the only type permitted should be.</div><div dir="auto"><br></div><div dir="auto">> The first few times you look at it, it seems</div><div dir="auto">> weird and magic, and then at some point</div><div dir="auto">> it seems obvious :)</div><div dir="auto"><br></div><div dir="auto">Yeah, I can definitely feel the gears turning lol.</div><div dir="auto"><br></div><div dir="auto">Let me ask though, is there a formal name for these type of relationships? I have seen in other discussions things like L types or Q types on Valhalla. Maybe they are entirely unrelated. Moreso my question is, is there some formal name that captures this type of relationship or logic?</div><div dir="auto"><br></div><div dir="auto">For example, if I want to learn integrals, I would need to first understand derivatives, how they play with that E shaped summation thing, then learn antiderivatives, and then I can learn about integrals. However, if I look up Calculus, I get a nice overhead view of each of these components, allowing me to learn one after the other until I can understand. Googling calculus is all I need to be able to learn everything I need to understand integrals.</div><div dir="auto"><br></div><div dir="auto">Is there a similar blanket term that covers this type of logic? I understand f bounded types now, but I want to learn about other relationships like this and don't really know the parent term they fall under.</div><div dir="auto"><br></div><div dir="auto">Thank you for your time and help!</div><div dir="auto">David Alayachew</div><div dir="auto"><br></div><div dir="auto">[1] = <a href="https://stackoverflow.com/a/70504547">https://stackoverflow.com/a/70504547</a></div></div></div>