Ok - I changed it to:

def keys: List[KeyType] = map.keySet().asInstanceOf[Set
[KeyType]].toList

there was an implicit in jcl:

import _root_.scala.collection.jcl.Conversions.convertSet

Cheers, Tim

On Mar 5, 9:49 pm, David Pollak <[email protected]> wrote:
> On Thu, Mar 5, 2009 at 12:04 PM, Timothy Perrett 
> <[email protected]>wrote:
>
>
>
> > I agree, and I would have gone for toList or toSeq or something
> > however its a java.util.Set, so in order to get that functionality
> > we'd need to to:
>
> > .toArray.toList
>
> Try looking at scala.collection.jcl  I think there's an implicit that will
> take the set and turn it into a Seq[whatever]
>
>
>
>
>
> > Whilst I could live with this, it does feel somewhat dirty.
>
> > Cheers, Tim
>
> > On Mar 5, 7:57 pm, David Pollak <[email protected]> wrote:
> > > Looks good to me except the toArray part... I prefer toList is that's
> > > available
>
> > > On Mar 5, 2009 11:41 AM, "Tim Perrett" <[email protected]> wrote:
>
> > > Guys,
>
> > > I have a situation where I need to retrive all the keys in my
> > > KeyedCache - however, KeyedCache extends LRU, which it turn uses
> > > apache commons LRUMap internally.
>
> > > The LRU class has a private val map: LRUMap
>
> > > Is there any objections to me adding a method to LRU to return all the
> > > keys from that map?:
>
> > > // off the top of my head...
> > > def keys: Array[KeyType] = map.keySet().asInstanceOf[Set
> > > [KeyType]].toArray
>
> > > Thoughts?
>
> > > Cheers, Tim
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to