What are the pros and cons of having a CaseInsensitiveString type in Java? [closed]
https://softwareengineering.stackexchange.com/questions/89949
-
01-11-2019 - |
题
I'm tempted to create a final class CaseInsensitiveString implements CharSequence
.
This would allow us to define variables and fields of this type, instead of using a regular String
. We can also have e.g. a Map<CaseInsensitiveString, ?>
, a Set<CaseInsensitiveString>
, etc.
What are some of the pros and cons of this approach?
没有正确的解决方案