<div dir="ltr">Check the answer to this stackoverflow.  It says it better than I can.  <a href="http://stackoverflow.com/questions/3009745/what-does-the-question-mark-in-java-generics-type-parameter-mean">http://stackoverflow.com/questions/3009745/what-does-the-question-mark-in-java-generics-type-parameter-mean</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 21, 2016 at 1:08 PM, trent shipley <span dir="ltr"><<a href="mailto:trent.shipley@gmail.com" target="_blank">trent.shipley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="color:rgb(33,33,33);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px"><p style="color:rgb(34,34,34);font-family:arial,sans-serif">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.</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">public WeightedCollection(Comparator<? super E> comp)<br></p><p style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">package pcgen.base.util;<br></p><p style="color:rgb(34,34,34);font-family:arial,sans-serif"><</ deleted stuff>></p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">/**</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">* Constructs an empty WeightedCollection with the given Comparator used to</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">* establish equality and order in the WeightedCollection.</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">* </p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">* @param comp</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">*            The Comparator this Set will use to determine equality and</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">*            order of the WeightedCollection</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">*/</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">public WeightedCollection(Comparator<? super E> comp)</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">{</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">     if (comp == null)</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">     {</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">          theData = new ListSet<WeightedItem<E>>();</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">     }</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">     else</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">     {</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">          theData = new TreeSet<WeightedItem<E>>(</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">                new WeightedItemComparator<E>(comp));</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif">     }</p><p style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small"></p><span style="color:rgb(34,34,34);font-family:arial,sans-serif;word-spacing:normal">}</span> <p></p></div><div><br></div></div>
<br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">James McPhee<br><a href="mailto:jmcphe@gmail.com" target="_blank">jmcphe@gmail.com</a></div>
</div>