// a class definition that does something with things that extend PApplet
class Heythere<T extends PApplet>{
}

// method definition which can do things with papplet
public <T extends PApplet> void doSomething( T thing ){
}