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

Add ability to create a Future for a constant

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0
    • lang.concurrent.*
    • None

    Description

      The concurrent Future interface is a nice way to gain access to an object at some future point in time. However, sometimes you need an implementation that isn't used for concurrency, but is used to avoid a null check or for testing.

      Add a ConstantFuture class that implements the Future interface and returns the constant value.

      Attachments

        1. ConstantFuture.patch
          4 kB
          Stephen Colebourne

        Issue Links

          Activity

            People

              scolebourne Stephen Colebourne
              scolebourne Stephen Colebourne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: