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

[lang] Request for MutableBoolean implementation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1
    • 2.2
    • None
    • None
    • Operating System: All
      Platform: All

    • 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

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

            Dates

              Created:
              Updated:
              Resolved: