Re: Generic generics help



You're correct, I totally missed it, thanks for highlighting it.


<lscharen@xxxxxxxxx> wrote in message news:117251dd-d130-4449-801d-a65820ea7ae1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 29, 9:02 am, "wizard of oz" <nos...@xxxxxxxxx> wrote:

However the question is still relevant. What if I want to have a single
method that can manipulate either one of the headers and accept a parameter
appropriate to the "type" of header (i.e. an R or C)?

[snip]

Surely this is possible!?!?!

Yes. Use this method signature

public <K> void ensureExists (TreeSet<K> treeSet, K key)
^^^

I've highlighted the difference between it and the signature of your
method in case you missed the change the first time.

-Lucas


.



Relevant Pages