I'm not completely up on generics. I don't care for them all that much. But from what I can see, you use extends to remove stuff from the collection and super to add stuff to the collection. extends creates a child class, where super references the parent class. it seems like a hacky way to go about manipulating collections of generics, but the whole generics systems feels like that to me. On Sat, May 21, 2016 at 6:47 PM, trent shipley wrote: > "extends" used with a wildcard {"?"} such as SomeCollection > makes sense to me. After reading stackoverflow, I am only somewhat more > enlightened on what SomeCollection means, how it is used, and > why one might want to use it. > > Trent. > > On Sat, May 21, 2016 at 6:18 PM James Mcphee wrote: > >> Check the answer to this stackoverflow. It says it better than I can. >> http://stackoverflow.com/questions/3009745/what-does-the-question-mark-in-java-generics-type-parameter-mean >> >> On Sat, May 21, 2016 at 1:08 PM, trent shipley >> wrote: >> >>> 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 comp) >>> >>> >>> package pcgen.base.util; >>> >>> <> >>> >>> /** >>> >>> * 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 comp) >>> >>> { >>> >>> if (comp == null) >>> >>> { >>> >>> theData = new ListSet>(); >>> >>> } >>> >>> else >>> >>> { >>> >>> theData = new TreeSet>( >>> >>> new WeightedItemComparator(comp)); >>> >>> } >>> >>> } >>> >>> >>> >>> --------------------------------------------------- >>> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >>> To subscribe, unsubscribe, or to change your mail settings: >>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss >>> >> >> >> >> -- >> James McPhee >> jmcphe@gmail.com >> --------------------------------------------------- >> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >> To subscribe, unsubscribe, or to change your mail settings: >> http://lists.phxlinux.org/mailman/listinfo/plug-discuss > > > --------------------------------------------------- > PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org > To subscribe, unsubscribe, or to change your mail settings: > http://lists.phxlinux.org/mailman/listinfo/plug-discuss > -- James McPhee jmcphe@gmail.com