Preserve SORTED and DISTINCT characteristics for boxed() and asLongStream() operations

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      Currently IntStream.boxed(), LongStream.boxed(), DoubleStream.boxed() operations remove SORTED and DISTINCT flags, though in fact these operations do preserve them. This is especially important as distinct() for primitive streams is implemented like "boxed().distinct().unbox" where boxed() kills the flags which could be used for distinct() optimization.

      Similarly IntStream.asLongStream() unnecessarily remove SORTED and DISTINCT flags. IntStream.asDoubleStream() and LongStream.asDoubleStream() also could preserve SORTED (but not DISTINCT, at least for LongStream.asDoubleStream()).

            Assignee:
            Tagir Valeev
            Reporter:
            Tagir Valeev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: