Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-186

[lang] Request for MutableBoolean implementation

    Details

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

      Operating System: All
      Platform: All

    • Bugzilla Id:
      37111

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: