Ulises CT
Ulises CT

Reputation: 1467

Get object from HashMap which contains key substring

I have a Map object which has COM-20 HELLO as key and My name as value.

Is there any way to get this object by indicating that I want the key that contains COM-20 without the HELLO

Thanks.

Upvotes: 0

Views: 379

Answers (1)

Taalay Joldoshev
Taalay Joldoshev

Reputation: 36

Keys should be unique, if you have a map with keys like: COM-20 HELLO1 and COM-20 HELLO2 what should it return? both of them? It is not possible.

Upvotes: 2

Related Questions