L
LuckyBoy
I have a delimited file of format
USER:ROLE:RESOURCE
It can have any number of records.
I want to parse this file in Java.
What I want to know is how to do this:
For each distinct USER having ROLE and RESOURCE
add to some Java DataStructure (which would be best ?)
I mean:
if SAM:USER: PC
SAM:ADMIN:LAN
MIKE:USER:LAPTOP
Then my DataStructure must have only 1 entry of SAM and MIKE
but all records for SAM AND MIKE.
i mean something like:
SAM:USER
C
:ADMIN:LAN
MIKE:USER:LAPTOP
Any suggestions ? Ideas ? which DataStructure ? HashMap ?
How to do this ?
USER:ROLE:RESOURCE
It can have any number of records.
I want to parse this file in Java.
What I want to know is how to do this:
For each distinct USER having ROLE and RESOURCE
add to some Java DataStructure (which would be best ?)
I mean:
if SAM:USER: PC
SAM:ADMIN:LAN
MIKE:USER:LAPTOP
Then my DataStructure must have only 1 entry of SAM and MIKE
but all records for SAM AND MIKE.
i mean something like:
SAM:USER
:ADMIN:LAN
MIKE:USER:LAPTOP
Any suggestions ? Ideas ? which DataStructure ? HashMap ?
How to do this ?