commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal Schumacher (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LANG-1235) Add decrementAndGet/incrementAndGet to MutableInt class
Date Wed, 19 Oct 2016 15:24:59 GMT

     [ https://issues.apache.org/jira/browse/LANG-1235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pascal Schumacher closed LANG-1235.
-----------------------------------

> Add decrementAndGet/incrementAndGet to MutableInt class
> -------------------------------------------------------
>
>                 Key: LANG-1235
>                 URL: https://issues.apache.org/jira/browse/LANG-1235
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Sebb
>
> Frequently when incrementing or decrementing a number, one needs to compare it to a limit.
For example in loops.
> At present that requires two calls:
> MutableInt.decrement()
> MutableInt.getValue()
> It would be convenient to have a method that combined the two.
> c.f. AtomicInteger.decrementAndGet()
> There is less likelihood of needing these methods for other Mutable Number types as they
are not often used in loops.



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

Mime
View raw message