Commons Lang
  1. Commons Lang
  2. LANG-186

[lang] Request for MutableBoolean implementation

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      I ran into a situation where a MutableBoolean implementation was actually useful and wondered if
      Commons Lang might consider adding the implementation. My example:

      final MutableBoolean success = new MutableBoolean(false);
      doSomething(new MyCallbackInterface() {
      public void callback()

      { // do something... success.setValue(true); }

      );

      Basically the ability to change the boolean's state within an inner class, where the declared object must
      be 'final'. Pretty obscure I realize, but this turned out to be quite useful in the application I was working
      on.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Matt Magoffin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development