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

Update Stream demo

    XMLWordPrintable

Details

    Description

      Stream is a new interface that is introduced in JDK8. We have new demo code showing
      1. How to use API usage for Stream interface. Using some real world data to propagate to show how to solve real world question.
      1-1. Aggregation
       A demo shows how does Stream's aggregation works. Demo shows sum operation on stream interface and use Stream's count operation as Function output
      1-2. Conditional
      A demo shows conditional filter usage for collection interface. Which includes simple filter on collection, Combination of predicates filter on collection. Also include grouping collection, also attach filter at the same time.
      1-3. Conversion
      A demo shows how to use the conversion operator like toArray, collect(Collectors.toList()), collect(Collectors.toCollection())
      1-4. Elements.
      A demos find operation that attach to collection.
      1-5. Grouping
      A demo shows usage of group Collector working with collect method.
      1-6. Subset
      A demo shows how does Stream's subset works
      1-7. Tabulate
      A demo shows how does Stream's flatMap works
      2. Parallel stream demo. Parallel stream is one of key value that brought with Lambda feature. Parallel stream demo shows how to use stream in parallel mode.
      2-1. MonteCarloPI
      A demo shows how to use the parallel mode and the Monte Carlo method to calculate the value of PI
      2-2. RandomPrimeNumber
      demo shows how to use the parallel mode to find an unknown lengths prime number

      Attachments

        Activity

          People

            tyan Tristan Yan (Inactive)
            tyan Tristan Yan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: