Java equivalent of Perl's hash

前端 未结 8 1314
粉色の甜心
粉色の甜心 2021-01-18 02:05

I\'ve been using a lot Perl hashes due to super flexibility and convenient. for instance, in Perl I can do the following:

$hash{AREA_CODE}->{PHONE}->{S         


        
8条回答
  •  一个人的身影
    2021-01-18 02:28

    I missed the perl hashes a lot in my work and made some ugly workarounds with hash classes.

    Last week I had an idea to implement the whole thing in one PerlMap class which use delimiters to access objects and foremost the Lists zu access subsets.

    It works fine with map.get(code:street:phone) and map.put(code:street:phone,"123456789"). To get a list of phonenumber you just use map.getList(code:street).

    I've just started but use in my project now. It has no limitations of complexity :-) and you can choose the delimiter free. I put the whole stuff under http://www.jdeer.org. Have fun.

提交回复
热议问题