Java keyword "super"

trent shipley trent.shipley at gmail.com
Sat May 21 13:08:26 MST 2016


Can anyone tell me what the keyword "super" does in this parameter list for
the constructor below? I can only find documentation for the more mundane
use when a method references an ancestor.

public WeightedCollection(Comparator<? super E> comp)


package pcgen.base.util;

<</ deleted stuff>>

/**

* Constructs an empty WeightedCollection with the given Comparator used to

* establish equality and order in the WeightedCollection.

*

* @param comp

*            The Comparator this Set will use to determine equality and

*            order of the WeightedCollection

*/

public WeightedCollection(Comparator<? super E> comp)

{

     if (comp == null)

     {

          theData = new ListSet<WeightedItem<E>>();

     }

     else

     {

          theData = new TreeSet<WeightedItem<E>>(

                new WeightedItemComparator<E>(comp));

     }

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20160521/02024359/attachment.html>


More information about the PLUG-discuss mailing list