[
https://issues.apache.org/jira/browse/LANG-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Hagemans closed LANG-1666.
--------------------------------
Resolution: Won't Fix
> Add ObjectUtils.equalsAny
> -------------------------
>
> Key: LANG-1666
> URL: https://issues.apache.org/jira/browse/LANG-1666
> Project: Commons Lang
> Issue Type: New Feature
> Reporter: Felix Hagemans
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> I think an {{equalsAny}} utility method would be a nice simple addition to
> the ObjectUtils class. For example:
> {code:java}if (valueA.equals(someObject.getSomeGetter()) ||
> valueB.equals(someObject.getSomeGetter()) { ... }{code}
> could be written a lot cleaner:
> {code:java}if (ObjectUtils.equalsAny(someObject.getSomeGetter(), valueA,
> valueB) { ... }{code}
> It would work similar to the already existing StringUtils.equalsAny method.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)