Getting keys from HashMap

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting keys from HashMap

ajaybhat
Hi,

Is there any way to get the keys as a ArrayList from HashMap in org.apache.pivot.collections.HashMap?

In java.util.TreeMap we would just use keySet() function. Is there anything similar in Pivot?

Thanks,
Ajay Bhat
Reply | Threaded
Open this post in threaded view
|

Re: Getting keys from HashMap

Roger and Beth Whitcomb
Hi Ajay,
   No there isn't such a method. Wouldn't be too hard to do if you want to tackle it. I believe there is an existing issue about adding methods to Pivot Collections to bring them more in line with the Java ones.

~Roger Whitcomb

Sent from my iPhone

> On Nov 16, 2013, at 11:11 PM, Ajay Bhat <[hidden email]> wrote:
>
> Hi,
>
> Is there any way to get the keys as a ArrayList from HashMap in org.apache.pivot.collections.HashMap?
>
> In java.util.TreeMap we would just use keySet() function. Is there anything similar in Pivot?
>
> Thanks,
> Ajay Bhat
Reply | Threaded
Open this post in threaded view
|

Re: Getting keys from HashMap

Sandro Martini
Hi,
this is the related issue: https://issues.apache.org/jira/browse/PIVOT-799
be free to put some comment/request/patch there ...

Note that there is even the package
org.apache.pivot.collections.adapter to transform Pivot Collections
to/from Java Collections.
Take a look and tell us if something is still missing.

Bye


2013/11/17 Roger Whitcomb <[hidden email]>:

> Hi Ajay,
>    No there isn't such a method. Wouldn't be too hard to do if you want to tackle it. I believe there is an existing issue about adding methods to Pivot Collections to bring them more in line with the Java ones.
>
> ~Roger Whitcomb
>
> Sent from my iPhone
>
>> On Nov 16, 2013, at 11:11 PM, Ajay Bhat <[hidden email]> wrote:
>>
>> Hi,
>>
>> Is there any way to get the keys as a ArrayList from HashMap in org.apache.pivot.collections.HashMap?
>>
>> In java.util.TreeMap we would just use keySet() function. Is there anything similar in Pivot?
>>
>> Thanks,
>> Ajay Bhat