1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-10 06:20:27 -04:00
Reinhard Pointner a9285d53fd [!] Stream.count() may short-circuit and not traverse any elements at all.
@apiNote
An implementation may choose to not execute the stream pipeline (either sequentially or in parallel) if it is capable of computing the count directly from the stream source. In such cases no source elements will be traversed and no intermediate operations will be evaluated. Behavioral parameters with side-effects, which are strongly discouraged except for harmless cases such as debugging, may be affected. For example, consider the following stream:

List<String> l = Arrays.asList("A", "B", "C", "D");
long count = l.stream().peek(System.out::println).count();

The number of elements covered by the stream source, a List, is known and the intermediate operation, peek, does not inject into or remove elements from the stream (as may be the case for flatMap or filter operations). Thus the count is the size of the List and there is no need to execute the pipeline and, as a side-effect, print out the list elements.
2019-05-20 13:13:12 +07:00
2019-05-19 20:38:24 +07:00
2019-05-14 18:40:21 +07:00
2019-04-30 00:45:35 +07:00
2019-05-09 20:30:31 +07:00
2019-05-18 11:09:02 +07:00
2019-05-14 18:25:00 +07:00
2019-05-18 03:04:33 +07:00
2018-10-01 13:27:56 +07:00

FileBot

The FileBot source code is available for your convenience:

  • You may view the source code and learn from it.
  • You may build FileBot for private use on unsupported platforms.
  • You may NOT use the source code to publish binary builds without explicit authorization.

Please respect the author that is kindly making the source code available under the MODIFIED DON'T BE A DICK PUBLIC LICENSE.

Description
archive of deleted filebot
Readme 448 MiB
Languages
Java 96.8%
Diff 1.2%
Shell 1.1%
Public Key 0.4%
Windows Registry Entries 0.2%
Other 0.2%