Tabnine Logo
ArrayList.parallelStream
Code IndexAdd Tabnine to your IDE (free)

How to use
parallelStream
method
in
java.util.ArrayList

Best Java code snippets using java.util.ArrayList.parallelStream (Showing top 20 results out of 315)

origin: goldmansachs/gs-collections

@Benchmark
public void parallel_lazy_jdk()
{
  Map<Alphagram, List<String>> groupBy = this.jdkWords.parallelStream().collect(Collectors.groupingBy(Alphagram::new));
  groupBy.entrySet()
      .parallelStream()
      .map(Map.Entry::getValue)
      .filter(list -> list.size() >= SIZE_THRESHOLD)
      .sorted(Comparator.<List<String>>comparingInt(List::size).reversed())
      .map(list -> list.size() + ": " + list)
      .forEach(e -> Assert.assertFalse(e.isEmpty()));
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByQuantity_parallel_lazy_direct_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().max(
      QUANTITY_COMPARATOR_METHODREF).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position minByQuantity_parallel_lazy_direct_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().min(
      QUANTITY_COMPARATOR_METHODREF).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByMarketValue_parallel_lazy_direct_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().max(
      MARKET_VALUE_COMPARATOR_METHODREF).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position minByQuantity_parallel_lazy_direct_lambda_jdk()
{
  return this.positions.getJdkPositions().parallelStream().min(
      QUANTITY_COMPARATOR_LAMBDA).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByMarketValue_parallel_lazy_direct_lambda_jdk()
{
  return this.positions.getJdkPositions().parallelStream().max(
      MARKET_VALUE_COMPARATOR_LAMBDA).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByQuantity_parallel_lazy_direct_lambda_jdk()
{
  return this.positions.getJdkPositions().parallelStream().max(
      QUANTITY_COMPARATOR_LAMBDA).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position minByMarketValue_parallel_lazy_direct_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().min(
      MARKET_VALUE_COMPARATOR_METHODREF).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByMarketValue_parallel_lazy_collect_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.maxBy(MARKET_VALUE_COMPARATOR_METHODREF)).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByMarketValue_parallel_lazy_collect_lambda_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.maxBy(MARKET_VALUE_COMPARATOR_LAMBDA)).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position minByQuantity_parallel_lazy_collect_lambda_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.minBy(QUANTITY_COMPARATOR_LAMBDA)).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Map<Product, DoubleSummaryStatistics> aggregateByProduct_parallel_lazy_jdk()
{
  Map<Product, DoubleSummaryStatistics> result =
      this.jdkPositions.parallelStream().collect(
          Collectors.groupingBy(
              Position::getProduct,
              Collectors.summarizingDouble(Position::getMarketValue)));
  Assert.assertNotNull(result);
  return result;
}
origin: goldmansachs/gs-collections

@Benchmark
public Map<String, Double> sumByCategory_parallel_lazy_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.groupingBy(
          Position::getCategory,
          Collectors.summingDouble(Position::getMarketValue)));
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByQuantity_parallel_lazy_collect_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.maxBy(QUANTITY_COMPARATOR_METHODREF)).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Map<Account, Double> sumByAccount_parallel_lazy_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.groupingBy(
          Position::getAccount,
          Collectors.summingDouble(Position::getMarketValue)));
}
origin: goldmansachs/gs-collections

@Benchmark
public Position maxByQuantity_parallel_lazy_collect_lambda_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.maxBy(QUANTITY_COMPARATOR_LAMBDA)).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Position minByQuantity_parallel_lazy_collect_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.minBy(QUANTITY_COMPARATOR_METHODREF)).get();
}
origin: goldmansachs/gs-collections

@Benchmark
public Map<String, DoubleSummaryStatistics> aggregateByCategory_parallel_lazy_jdk()
{
  Map<String, DoubleSummaryStatistics> result =
      this.jdkPositions.parallelStream().collect(
          Collectors.groupingBy(Position::getCategory, Collectors.summarizingDouble(Position::getMarketValue)));
  Assert.assertNotNull(result);
  return result;
}
origin: goldmansachs/gs-collections

@Benchmark
public Map<Product, Double> sumByProduct_parallel_lazy_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.groupingBy(
          Position::getProduct,
          Collectors.summingDouble(Position::getMarketValue)));
}
origin: goldmansachs/gs-collections

@Benchmark
public Position minByMarketValue_parallel_lazy_collect_methodref_jdk()
{
  return this.positions.getJdkPositions().parallelStream().collect(
      Collectors.minBy(MARKET_VALUE_COMPARATOR_METHODREF)).get();
}
java.utilArrayListparallelStream

Popular methods of ArrayList

  • <init>
  • add
  • size
    Returns the number of elements in this ArrayList.
  • get
    Returns the element at the specified position in this list.
  • toArray
    Returns an array containing all of the elements in this list in proper sequence (from first to last
  • addAll
    Adds the objects in the specified collection to this ArrayList.
  • remove
    Removes the first occurrence of the specified element from this list, if it is present. If the list
  • clear
    Removes all elements from this ArrayList, leaving it empty.
  • isEmpty
    Returns true if this list contains no elements.
  • iterator
    Returns an iterator over the elements in this list in proper sequence.The returned iterator is fail-
  • contains
    Searches this ArrayList for the specified object.
  • set
    Replaces the element at the specified position in this list with the specified element.
  • contains,
  • set,
  • indexOf,
  • clone,
  • subList,
  • stream,
  • ensureCapacity,
  • trimToSize,
  • removeAll,
  • toString

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now