Re: Generic generics help
- From: "wizard of oz" <nospam@xxxxxxxxx>
- Date: Fri, 29 Aug 2008 23:19:18 GMT
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
.
- Prev by Date: Re: Help with Java-based RIA Framework
- Next by Date: remote file date
- Previous by thread: Re: Generic generics help
- Next by thread: exceptions: checked or unchecked?
- Index(es):
Relevant Pages
|