I would like to have a PriorityQueue whose elementes are instances of different subclasses.
Event is an abstract superclass.
Event1, Event2, Event3 are subclasses.
Xpto<> is an interface and PriorityQueueXpto<> is a class that implements Xpto and extends PriorityQueue.
Xpto<? extends Event> a = new PriorityQueueXpto<????>();
Is this possible? How?
Thank you in advance!