Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8178117

public state constructors for Int/Long/DoubleSummaryStatistics

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b31

      Description

      It's possible to extract the state from a Int/Long/DoubleSummaryStatistics with the getter methods, but it is not directly possible to reconstruct a new instance from that state (there are round about ways to do that which are not recommended by clever use of accepting and combining).

      These classes need public constructors that accept argument values representing the state that is returned by the getters.

      With such constructors its possible for third parties to independently serialize the state.

      It is not proposed to make these classes non-final and/or serializable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psandoz Paul Sandoz
                Reporter:
                psandoz Paul Sandoz
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: