What does this Java generics paradigm do and what is it called?

后端 未结 3 1398
醉酒成梦
醉酒成梦 2020-12-18 01:10

I\'m looking at some Java classes that have the following form:


public 
abstract
class A > implements Comparable  {

           


        
3条回答
  •  时光取名叫无心
    2020-12-18 02:04

    In C++, it's known as the Curiously Recurring Template Pattern (CRTP). I don't know if it has a different name in Java (or even if it has a name), but it probably serve similar purposes.

提交回复
热议问题