Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2743

PerThreadValue<T> should provide more convenience methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Implemented
    • None
    • 5.8.3
    • tapestry-ioc
    • None

    Description

      The type org.apache.tapestry5.ioc.services.PerThreadValue<T> should provide more convenience methods like Map does, e. g.:

      • T computeIfAbsent(Supplier<? super T> fn)
      • T computeIfPresent(Function<? super T, ? extends T> fn)
      • T compute(Function<? super T, ? extends T> fn){}

      I believe these methods would simplify using PerThreadValue and they should be implementable with default methods directly on the interface.

      Attachments

        Issue Links

          Activity

            People

              ben-ng Ben Weidig
              ben-ng Ben Weidig
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m