commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-1257) Add APIs StringUtils.wrapIfMissingt(String, char|String)
Date Tue, 16 Aug 2016 15:07:22 GMT
Gary Gregory created LANG-1257:
----------------------------------

             Summary: Add APIs StringUtils.wrapIfMissingt(String, char|String)
                 Key: LANG-1257
                 URL: https://issues.apache.org/jira/browse/LANG-1257
             Project: Commons Lang
          Issue Type: New Feature
          Components: lang.*
            Reporter: Gary Gregory
            Assignee: Gary Gregory
             Fix For: 3.5


Add APIs:

- Add APIs StringUtils.wrapIfMissing(String, char)
- Add APIs StringUtils.wrapIfMissing(String, String)

Note: We already have:

- StringUtils.wrap(String, char)
- StringUtils.wrap(String, String)

And we already use the "IfMissing" name segment in "appendIfMissing()" and "prependIfMissing".

Using "IfAbsent" would have been a better choice IMO since the JRE already uses "IfAbsent"
in ConcurrentHashMap for example; but consistency is better here I think.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message