#How to have a list that has two keys?
1 messages · Page 1 of 1 (latest)
You can:
- Store the same record for each key if space isn't an issue.
- Store the same record's pointer for each key. Have a separate ArrayList of records. Convenient if you want to edit the records.
I'd hope you can avoid this by convertingconn_idto itsuser_idequivalent, though.
Use the adapted variant of the hashmap
Unsure how you’d make them hash to the same index though
Make two StringArrayHashMaps. Give one of them a void value, and instead use the index from that one to access the other one
you'll need to be careful to keep them both in sync, but that shouldn't be too hard