Описание тега f-bounded-polymorphism

Interfaces or classes having a type parameter which is a subtype of the interface itself, in any language; also known as the "curiously recurring template pattern". It helps defining chaining methods in a hierarchy of classes, or typed cloning methods.

A F-bounded polymorphism allows an abstract class, an interface or a trait to access the type of its implementation. It can be useful to define methods in the abstract class that return the type of the subclass itself, such as for cloning, chaining two methods, etc.

Here is an example for the clone method.

Java

abstract class Base<T extends Base<T>> {
    public T clone(T original);
}
class Derived extends Base<Derived > {
    @Override public A clone(A original) {
       //...
    }
}

Scala

trait Base[T <: Base[T]] {
  def clone(): T
}
class Derived extends Base[Derived] {
  def clone(): Derived = //...
}

C++

template<class T>
class Base
{
    // ...
};
class Derived : public Base<Derived>
{
    // ...
};

Wikipedia pages dealing with it:
Bounded quantification
https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern