• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Curly Generics Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Curly Generics Question


  • Subject: Curly Generics Question
  • From: Andrew Lindesay <email@hidden>
  • Date: Fri, 15 May 2009 14:46:46 +1200

I've been working with generics for quite a while (and quite like them) but this one has me stumped!

public WORequest createRequest(String method,String url,String anHTTPVersion,Map<String,? extends List<String>> someHeaders,NSData content,Map<String,Object> someInfo)
{
...
someHeaders.add("foo", Collections.<String>singletonList("bar"));
...
}


This causes a compile error "The method add(String,List<String>) is undefined for the type Map<String,capture#1-of? extends List<String>>". Any help appreciated!

cheers.

___
Andrew Lindesay
www.lindesay.co.nz

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Curly Generics Question - Update
      • From: Andrew Lindesay <email@hidden>
  • Prev by Date: [OT] Help needed for wocommunity.org
  • Next by Date: Re: Curly Generics Question - Update
  • Previous by thread: [OT] Help needed for wocommunity.org
  • Next by thread: Re: Curly Generics Question - Update
  • Index(es):
    • Date
    • Thread