├── .mvn ├── wrapper │ └── maven-wrapper.properties ├── extensions.xml └── settings.xml ├── src ├── test │ ├── resources │ │ └── junit-platform.properties │ └── java │ │ └── berlin │ │ └── yuna │ │ └── streamline │ │ └── model │ │ ├── ExRunnable.java │ │ ├── StreamLinePerformanceTest.java │ │ └── StreamLineTest.java └── main │ └── java │ └── berlin │ └── yuna │ └── streamline │ └── model │ └── StreamLine.java ├── .github ├── workflows │ ├── daily.yml │ ├── on_push.yml │ ├── on_merge.yml │ └── build.yml ├── ISSUE_TEMPLATE │ ├── ------help.md │ ├── ---feature-request.md │ └── ---bug-report.md ├── pull_request_template.md └── FUNDING.yml ├── CONTRIBUTING.md ├── .gitignore ├── README.md ├── mvnw.cmd ├── LICENSE ├── pom.xml ├── mvnw └── .editorconfig /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | wrapperVersion=3.3.4 2 | distributionType=only-script 3 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 4 | -------------------------------------------------------------------------------- /src/test/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | junit.jupiter.execution.parallel.enabled = true 2 | junit.jupiter.execution.parallel.mode.default=concurrent 3 | junit.jupiter.execution.parallel.mode.classes.default=concurrent 4 | -------------------------------------------------------------------------------- /src/test/java/berlin/yuna/streamline/model/ExRunnable.java: -------------------------------------------------------------------------------- 1 | package berlin.yuna.streamline.model; 2 | 3 | @FunctionalInterface 4 | public interface ExRunnable { 5 | @SuppressWarnings({"java:S112", "RedundantThrows"}) 6 | void run() throws Exception; 7 | } 8 | -------------------------------------------------------------------------------- /.github/workflows/daily.yml: -------------------------------------------------------------------------------- 1 | name: "Daily" 2 | 3 | on: 4 | schedule: 5 | - cron: '0 7 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | builld: 10 | uses: YunaBraska/YunaBraska/.github/workflows/wc_java_build.yml@main 11 | with: 12 | run_update: true 13 | run_test: true 14 | run_deploy: false 15 | secrets: inherit 16 | -------------------------------------------------------------------------------- /.mvn/extensions.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | com.github.gzm55.maven 5 | project-settings-extension 6 | 0.1.1 7 | 8 | -------------------------------------------------------------------------------- /.github/workflows/on_push.yml: -------------------------------------------------------------------------------- 1 | name: "On Push" 2 | 3 | on: 4 | push: 5 | branches-ignore: 6 | - main 7 | - master 8 | - default 9 | 10 | jobs: 11 | builld: 12 | uses: YunaBraska/YunaBraska/.github/workflows/wc_java_build.yml@main 13 | with: 14 | ref: ${{ github.ref_name }} 15 | run_update: false # Updates only on main branches 16 | run_test: true # Always run tests 17 | run_deploy: disabled # Never deploy on non-main branches 18 | secrets: inherit 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/------help.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F468‍\U0001F4BB Help" 3 | about: Help needed 4 | title: '' 5 | labels: help wanted 6 | assignees: '' 7 | 8 | --- 9 | 10 | **What do you want to achieve?** 11 | A clear and concise description of what you want to achieve. 12 | 13 | **What did you try already?** 14 | A clear and concise description of what did you already try out. 15 | 16 | **Operating System** 17 | > N/A 18 | 19 | **Project Version** 20 | > N/A 21 | 22 | **Additional context** 23 | Add any other context about the problem here. 24 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Closes #000 2 | 3 | ### Types of changes 4 | 5 | - [ ] Bug fix (non-breaking change which fixes an issue) 6 | - [ ] New feature (non-breaking change which adds functionality) 7 | - [ ] Breaking change (fix or feature that would cause existing functionality to change) 8 | 9 | ## Motivation 10 | > Why is this change required? What problem does it solve? 11 | 12 | ## Changes 13 | > Behaviour, Functionality, Screenshots, etc. 14 | 15 | ## Success Check 16 | > How can we see or measure the change? 17 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. 4 | 5 | ## Pull Request Checklist 6 | 1) Create your branch from the main branch 7 | 2) Use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) 8 | 3) Increase the version by using [Semantic Versioning](https://semver.org) 9 | 4) Ensure your changes are covered by tests 10 | 5) Follow the rules of [Clean Code](https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29) while coding 11 | -------------------------------------------------------------------------------- /.mvn/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | gpg 6 | 7 | true 8 | 9 | 10 | gpg 11 | ${GPG_SECRET} 12 | 13 | 14 | 15 | 16 | 17 | ossrh 18 | ${OSSH_USER} 19 | ${OSSH_PASS} 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### STS ### 2 | .apt_generated 3 | .classpath 4 | .factorypath 5 | .project 6 | .settings 7 | .springBeans 8 | .sts4-cache 9 | /bin/ 10 | !**/src/main/**/bin/ 11 | !**/src/test/**/bin/ 12 | 13 | ### NetBeans ### 14 | /nbproject/private/ 15 | /nbbuild/ 16 | /nbdist/ 17 | /.nb-gradle/ 18 | /temp 19 | 20 | ### Editors ### 21 | .vscode/ 22 | coverage 23 | target/ 24 | .idea 25 | *.iws 26 | *.iml 27 | *.ipr 28 | out/ 29 | !**/src/main/**/out/ 30 | !**/src/test/**/out/ 31 | .gradle 32 | build/ 33 | !gradle/wrapper/gradle-wrapper.jar 34 | !**/src/main/**/build/ 35 | !**/src/test/**/build/ 36 | !**/cdk.out 37 | infrastructure/cdk.out 38 | functions/cdk.out 39 | common/cdk.out 40 | *.DS_Store 41 | .venv 42 | __pycache__ 43 | *.bat 44 | 45 | /cc-reporter* 46 | /public-key.asc 47 | 48 | lib/ 49 | node_modules 50 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F680 Feature request" 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Operating System** 20 | > N/A 21 | 22 | **Project Version** 23 | > N/A 24 | 25 | **Additional context** 26 | Add any other context or screenshots about the feature request here. 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F41B Bug report" 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **What happened?** 11 | A clear and concise description of what the bug is. 12 | 13 | **How can we reproduce the issue?** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Relevant log output** 21 | > N/A 22 | 23 | **Operating System** 24 | > N/A 25 | 26 | **Project Version** 27 | > N/A 28 | 29 | **Expected behavior** 30 | A clear and concise description of what you expected to happen. 31 | 32 | **Screenshots** 33 | If applicable, add screenshots to help explain your problem. 34 | 35 | **Additional context** 36 | Add any other context about the problem here. 37 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ YunaBraska ] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: ["https://www.paypal.com/donate/?hosted_button_id=HFHFUT3G6TZF6"] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/workflows/on_merge.yml: -------------------------------------------------------------------------------- 1 | name: "On Merge" 2 | 3 | on: 4 | pull_request_target: 5 | types: [ closed ] 6 | branches: 7 | - main 8 | - master 9 | - default 10 | paths-ignore: 11 | - '*.md' 12 | - '*.cmd' 13 | - '*.bat' 14 | - '*.sh' 15 | - 'FOUNDING.yml' 16 | - 'FOUNDING.yaml' 17 | - '.editorconfig' 18 | - '.gitignore' 19 | - 'docs/**' 20 | - '.github/**' 21 | - '.mvn/**' 22 | - '.gradle/**' 23 | jobs: 24 | builld: 25 | if: github.event.pull_request.merged == true 26 | uses: YunaBraska/YunaBraska/.github/workflows/wc_java_build.yml@main 27 | with: 28 | ref: ${{ github.ref_name }} 29 | run_update: false # Updates only on main branches 30 | run_test: true # Always run tests 31 | run_deploy: disabled # Never deploy on non-main branches 32 | secrets: inherit 33 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: "Build" 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | run_update: 7 | type: boolean 8 | default: false 9 | required: false 10 | description: "Update wrapper and properties" 11 | run_test: 12 | type: boolean 13 | default: true 14 | required: false 15 | description: "Runs tests" 16 | run_deploy: 17 | type: choice 18 | required: false 19 | default: "false" 20 | description: "true=force, false=on changes, disabled=never" 21 | options: 22 | - "disabled" 23 | - "true" 24 | - "false" 25 | ref: 26 | type: string 27 | required: false 28 | description: "[Optional] branch, tag or commit" 29 | 30 | jobs: 31 | builld: 32 | uses: YunaBraska/YunaBraska/.github/workflows/wc_java_build.yml@main 33 | with: 34 | ref: ${{ github.event.inputs.ref || github.ref || github.ref_name || github.head_ref }} 35 | run_update: ${{ inputs.run_update }} 36 | run_test: ${{ inputs.run_test }} 37 | run_deploy: ${{ inputs.run_deploy }} 38 | secrets: inherit 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StreamLine 2 | 3 | StreamLine is an enhanced Java Stream API optimized for concurrent processing, leveraging the power of Project Loom's 4 | virtual threads. Designed to provide superior performance in multithreaded environments, it simplifies the usage of 5 | streams without the common pitfalls of resource management in standard Java streams. 6 | 7 | [![Build][build_shield]][build_link] 8 | [![Maintainable][maintainable_shield]][maintainable_link] 9 | [![Coverage][coverage_shield]][coverage_link] 10 | [![Issues][issues_shield]][issues_link] 11 | [![Commit][commit_shield]][commit_link] 12 | [![Dependencies][dependency_shield]][dependency_link] 13 | [![License][license_shield]][license_link] 14 | [![Central][central_shield]][central_link] 15 | [![Tag][tag_shield]][tag_link] 16 | [![Javadoc][javadoc_shield]][javadoc_link] 17 | [![Size][size_shield]][size_shield] 18 | ![Label][label_shield] 19 | ![Label][java_version] 20 | 21 | ## Motivation 22 | 23 | Traditional Java streams are powerful but also come with big limits cause of the shared ForkedJoinPool which is not 24 | replaceable and also not programmatically configurable. 25 | Java's parallel streams start blocking each other in concurrent environments, leading to performance bottlenecks. 26 | Therefore, StreamLine was created to address these shortcomings. 27 | 28 | ### Benefits 29 | 30 | - **High-Performance Streaming**: Takes full advantage of Project Loom's virtual threads for efficient non-blocking 31 | concurrency. 32 | - **Simple API**: Offers a straightforward approach to parallel and asynchronous streaming operations. 33 | - **Resource Management**: Designed to avoid typical issues related to stream resource management, ensuring cleaner and 34 | safer code. 35 | - **Enhanced Scalability**: Performs exceptionally well under high-load conditions, scaling effectively across multiple 36 | cores. 37 | - **Pure Java**: No external dependencies for a lightweight integration. 38 | - **Functional Design**: Embraces modern Java functional paradigms. 39 | - **No Reflection**: Ensures compatibility with GraalVM native images. 40 | 41 | ### Prerequisites 42 | 43 | * Java 21 or later and for using Project Loom 44 | 45 | ### Usage 46 | 47 | ```java 48 | import berlin.yuna.streamline.model.StreamLine; 49 | 50 | public class Example { 51 | public static void main(final String[] args) { 52 | StreamLine.of("one", "two", "three") 53 | .threads(-1) // Use unlimited threads 54 | .forEach(System.out::println); 55 | } 56 | } 57 | ``` 58 | 59 | With custom thread pool: 60 | 61 | ```java 62 | import berlin.yuna.streamline.model.StreamLine; 63 | 64 | import java.util.concurrent.ForkJoinPool; 65 | 66 | public class Example { 67 | public static void main(final String[] args) { 68 | final ForkJoinPool executor = new ForkJoinPool(); 69 | 70 | StreamLine.of(executor, "one", "two", "three") 71 | .threads(-1) // Use unlimited threads 72 | .forEach(System.out::println); 73 | } 74 | } 75 | ``` 76 | 77 | ### StreamLine Performance 78 | 79 | Each method is tested with 10 concurrent streams including 10 tasks for every stream. 80 | CPU cores: 10. 81 | 82 | | Method | Time | 83 | |---------------------------|-------| 84 | | Loop \[for] | 1.86s | 85 | | Java Stream \[Sequential] | 1.86s | 86 | | Java Stream \[Parallel] | 724ms | 87 | | StreamLine \[Ordered] | 118ms | 88 | | StreamLine \[Unordered] | 109ms | 89 | | StreamLine \[2 Threads] | 512ms | 90 | 91 | ### Limitations 92 | * StreamLine is not compatible with Java 8 93 | * StreamLine is mainly made for big data processing and not for small data 94 | * The concurrent processing does not extend to operations returning type-specific streams 95 | like `IntStream`, `LongStream`, `DoubleStream`, `OptionalInt`, `OptionalLong`, `OptionalDouble`, etc. 96 | * StreamLine has more terminal operations than the usual java stream due its simple design - not sure if this is an advantage or disadvantage ^^ 97 | 98 | [build_shield]: https://github.com/YunaBraska/streamline/workflows/Daily/badge.svg 99 | 100 | [build_link]: https://github.com/YunaBraska/streamline/actions?query=workflow%3Daily 101 | 102 | [maintainable_shield]: https://img.shields.io/codeclimate/maintainability/YunaBraska/streamline?style=flat-square 103 | 104 | [maintainable_link]: https://codeclimate.com/github/YunaBraska/streamline/maintainability 105 | 106 | [coverage_shield]: https://img.shields.io/codeclimate/coverage/YunaBraska/streamline?style=flat-square 107 | 108 | [coverage_link]: https://codeclimate.com/github/YunaBraska/streamline/test_coverage 109 | 110 | [issues_shield]: https://img.shields.io/github/issues/YunaBraska/streamline?style=flat-square 111 | 112 | [issues_link]: https://github.com/YunaBraska/streamline/commits/main 113 | 114 | [commit_shield]: https://img.shields.io/github/last-commit/YunaBraska/streamline?style=flat-square 115 | 116 | [commit_link]: https://github.com/YunaBraska/streamline/issues 117 | 118 | [license_shield]: https://img.shields.io/github/license/YunaBraska/streamline?style=flat-square 119 | 120 | [license_link]: https://github.com/YunaBraska/streamline/blob/main/LICENSE 121 | 122 | [dependency_shield]: https://img.shields.io/librariesio/github/YunaBraska/streamline?style=flat-square 123 | 124 | [dependency_link]: https://libraries.io/github/YunaBraska/streamline 125 | 126 | [central_shield]: https://img.shields.io/maven-central/v/berlin.yuna/streamline?style=flat-square 127 | 128 | [central_link]:https://search.maven.org/artifact/berlin.yuna/streamline 129 | 130 | [tag_shield]: https://img.shields.io/github/v/tag/YunaBraska/streamline?style=flat-square 131 | 132 | [tag_link]: https://github.com/YunaBraska/streamline/releases 133 | 134 | [javadoc_shield]: https://javadoc.io/badge2/berlin.yuna/streamline/javadoc.svg?style=flat-square 135 | 136 | [javadoc_link]: https://javadoc.io/doc/berlin.yuna/streamline 137 | 138 | [size_shield]: https://img.shields.io/github/repo-size/YunaBraska/streamline?style=flat-square 139 | 140 | [label_shield]: https://img.shields.io/badge/Yuna-QueenInside-blueviolet?style=flat-square 141 | 142 | [gitter_shield]: https://img.shields.io/gitter/room/YunaBraska/streamline?style=flat-square 143 | 144 | [gitter_link]: https://gitter.im/streamline/Lobby 145 | 146 | [java_version]: https://img.shields.io/badge/java-21-blueviolet?style=flat-square 147 | -------------------------------------------------------------------------------- /src/test/java/berlin/yuna/streamline/model/StreamLinePerformanceTest.java: -------------------------------------------------------------------------------- 1 | package berlin.yuna.streamline.model; 2 | 3 | import org.junit.jupiter.api.AfterEach; 4 | import org.junit.jupiter.api.BeforeEach; 5 | import org.junit.jupiter.api.parallel.Execution; 6 | import org.junit.jupiter.api.parallel.ExecutionMode; 7 | import org.junit.jupiter.params.ParameterizedTest; 8 | import org.junit.jupiter.params.provider.Arguments; 9 | import org.junit.jupiter.params.provider.MethodSource; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | import java.util.concurrent.*; 14 | import java.util.stream.IntStream; 15 | import java.util.stream.Stream; 16 | 17 | import static org.junit.jupiter.api.Assertions.assertTrue; 18 | 19 | @Execution(ExecutionMode.SAME_THREAD) 20 | class StreamLinePerformanceTest { 21 | 22 | private static ExecutorService executorService; 23 | static final int STREAM_SIZE = 10; 24 | final static int TASK_SIZE = 10; 25 | 26 | @BeforeEach 27 | void setUp() { 28 | executorService = Executors.newThreadPerTaskExecutor(Thread.ofVirtual().name("virtual-thread-", 0).factory()); 29 | } 30 | 31 | @AfterEach 32 | void tearDown() { 33 | executorService.shutdown(); 34 | try { 35 | if (!executorService.awaitTermination(5, TimeUnit.SECONDS)) { 36 | executorService.shutdownNow(); 37 | } 38 | } catch (final InterruptedException e) { 39 | executorService.shutdownNow(); 40 | } 41 | } 42 | 43 | @ParameterizedTest(name = "{0}") 44 | @MethodSource("testArguments") 45 | void performanceTest(final String testName, final ExRunnable task) throws Exception { 46 | task.run(); 47 | } 48 | 49 | static Stream testArguments() { 50 | return Stream.of( 51 | Arguments.of("Loop [for]", (ExRunnable) StreamLinePerformanceTest::testNoStream), 52 | Arguments.of(Stream.class.getSimpleName() + " [Sequential]", (ExRunnable) StreamLinePerformanceTest::testStream), 53 | Arguments.of(Stream.class.getSimpleName() + "Stream [Parallel]", (ExRunnable) StreamLinePerformanceTest::testParallelStream), 54 | Arguments.of(StreamLine.class.getSimpleName() + " [Ordered]", (ExRunnable) StreamLinePerformanceTest::testStreamLine_with_order), 55 | Arguments.of(StreamLine.class.getSimpleName() + " [Unordered]", (ExRunnable) StreamLinePerformanceTest::testStreamLine_without_order), 56 | Arguments.of(StreamLine.class.getSimpleName() + " [2 Threads]", (ExRunnable) StreamLinePerformanceTest::testStreamLine_with_twoThreads) 57 | ); 58 | } 59 | 60 | static void testStreamLine_without_order() throws InterruptedException { 61 | final List> tasks = new ArrayList<>(); 62 | for (int i = 0; i < TASK_SIZE; i++) { 63 | tasks.add(Executors.callable(() -> { 64 | StreamLine.range(executorService, 0, STREAM_SIZE).map(StreamLinePerformanceTest::slowProcessing).toArray(); 65 | })); 66 | } 67 | 68 | final List> futures = executorService.invokeAll(tasks); 69 | assertTrue(futures.stream().allMatch(Future::isDone), "All tasks should complete successfully"); 70 | } 71 | 72 | static void testStreamLine_with_order() throws InterruptedException { 73 | final List> tasks = new ArrayList<>(); 74 | for (int i = 0; i < TASK_SIZE; i++) { 75 | tasks.add(Executors.callable(() -> { 76 | StreamLine.range(executorService, 0, STREAM_SIZE).ordered(true).map(StreamLinePerformanceTest::slowProcessing).toArray(); 77 | })); 78 | } 79 | 80 | assertTrue(executorService.invokeAll(tasks).stream().allMatch(Future::isDone), "All tasks should complete successfully"); 81 | } 82 | 83 | static void testStreamLine_with_twoThreads() throws InterruptedException { 84 | final List> tasks = new ArrayList<>(); 85 | for (int i = 0; i < TASK_SIZE; i++) { 86 | tasks.add(Executors.callable(() -> { 87 | StreamLine.range(executorService, 0, STREAM_SIZE).threads(2).map(StreamLinePerformanceTest::slowProcessing).toArray(); 88 | })); 89 | } 90 | 91 | assertTrue(executorService.invokeAll(tasks).stream().allMatch(Future::isDone), "All tasks should complete successfully"); 92 | } 93 | 94 | static void testStream() throws InterruptedException { 95 | final List> tasks = new ArrayList<>(); 96 | for (int i = 0; i < TASK_SIZE; i++) { 97 | tasks.add(Executors.callable(() -> { 98 | IntStream.range(0, STREAM_SIZE).boxed().map(StreamLinePerformanceTest::slowProcessing).toArray(); 99 | })); 100 | } 101 | 102 | assertTrue(executorService.invokeAll(tasks).stream().allMatch(Future::isDone), "All tasks should complete successfully"); 103 | } 104 | 105 | static void testParallelStream() throws InterruptedException { 106 | final List> tasks = new ArrayList<>(); 107 | for (int i = 0; i < TASK_SIZE; i++) { 108 | tasks.add(Executors.callable(() -> { 109 | IntStream.range(0, STREAM_SIZE).parallel().boxed().map(StreamLinePerformanceTest::slowProcessing).toArray(); 110 | })); 111 | } 112 | 113 | assertTrue(executorService.invokeAll(tasks).stream().allMatch(Future::isDone), "All tasks should complete successfully"); 114 | } 115 | 116 | static void testNoStream() throws InterruptedException { 117 | final List> tasks = new ArrayList<>(); 118 | for (int i = 0; i < TASK_SIZE; i++) { 119 | tasks.add(Executors.callable(() -> { 120 | for (int j = 0; j < STREAM_SIZE; j++) { 121 | slowProcessing(j); 122 | } 123 | })); 124 | } 125 | 126 | assertTrue(executorService.invokeAll(tasks).stream().allMatch(Future::isDone), "All tasks should complete successfully"); 127 | } 128 | 129 | private static long slowProcessing(final int n) { 130 | try { 131 | Thread.sleep(100); // Simulate a delay in processing 132 | } catch (final InterruptedException e) { 133 | Thread.currentThread().interrupt(); 134 | } 135 | return System.currentTimeMillis(); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | <# : batch portion 2 | @REM ---------------------------------------------------------------------------- 3 | @REM Licensed to the Apache Software Foundation (ASF) under one 4 | @REM or more contributor license agreements. See the NOTICE file 5 | @REM distributed with this work for additional information 6 | @REM regarding copyright ownership. The ASF licenses this file 7 | @REM to you under the Apache License, Version 2.0 (the 8 | @REM "License"); you may not use this file except in compliance 9 | @REM with the License. You may obtain a copy of the License at 10 | @REM 11 | @REM http://www.apache.org/licenses/LICENSE-2.0 12 | @REM 13 | @REM Unless required by applicable law or agreed to in writing, 14 | @REM software distributed under the License is distributed on an 15 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | @REM KIND, either express or implied. See the License for the 17 | @REM specific language governing permissions and limitations 18 | @REM under the License. 19 | @REM ---------------------------------------------------------------------------- 20 | 21 | @REM ---------------------------------------------------------------------------- 22 | @REM Apache Maven Wrapper startup batch script, version 3.3.4 23 | @REM 24 | @REM Optional ENV vars 25 | @REM MVNW_REPOURL - repo url base for downloading maven distribution 26 | @REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven 27 | @REM MVNW_VERBOSE - true: enable verbose log; others: silence the output 28 | @REM ---------------------------------------------------------------------------- 29 | 30 | @IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) 31 | @SET __MVNW_CMD__= 32 | @SET __MVNW_ERROR__= 33 | @SET __MVNW_PSMODULEP_SAVE=%PSModulePath% 34 | @SET PSModulePath= 35 | @FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( 36 | IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) 37 | ) 38 | @SET PSModulePath=%__MVNW_PSMODULEP_SAVE% 39 | @SET __MVNW_PSMODULEP_SAVE= 40 | @SET __MVNW_ARG0_NAME__= 41 | @SET MVNW_USERNAME= 42 | @SET MVNW_PASSWORD= 43 | @IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) 44 | @echo Cannot start maven from wrapper >&2 && exit /b 1 45 | @GOTO :EOF 46 | : end batch / begin powershell #> 47 | 48 | $ErrorActionPreference = "Stop" 49 | if ($env:MVNW_VERBOSE -eq "true") { 50 | $VerbosePreference = "Continue" 51 | } 52 | 53 | # calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties 54 | $distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl 55 | if (!$distributionUrl) { 56 | Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" 57 | } 58 | 59 | switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { 60 | "maven-mvnd-*" { 61 | $USE_MVND = $true 62 | $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" 63 | $MVN_CMD = "mvnd.cmd" 64 | break 65 | } 66 | default { 67 | $USE_MVND = $false 68 | $MVN_CMD = $script -replace '^mvnw','mvn' 69 | break 70 | } 71 | } 72 | 73 | # apply MVNW_REPOURL and calculate MAVEN_HOME 74 | # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ 75 | if ($env:MVNW_REPOURL) { 76 | $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } 77 | $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" 78 | } 79 | $distributionUrlName = $distributionUrl -replace '^.*/','' 80 | $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' 81 | 82 | $MAVEN_M2_PATH = "$HOME/.m2" 83 | if ($env:MAVEN_USER_HOME) { 84 | $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" 85 | } 86 | 87 | if (-not (Test-Path -Path $MAVEN_M2_PATH)) { 88 | New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null 89 | } 90 | 91 | $MAVEN_WRAPPER_DISTS = $null 92 | if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { 93 | $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" 94 | } else { 95 | $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" 96 | } 97 | 98 | $MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" 99 | $MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' 100 | $MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" 101 | 102 | if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { 103 | Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" 104 | Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" 105 | exit $? 106 | } 107 | 108 | if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { 109 | Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" 110 | } 111 | 112 | # prepare tmp dir 113 | $TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile 114 | $TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" 115 | $TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null 116 | trap { 117 | if ($TMP_DOWNLOAD_DIR.Exists) { 118 | try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } 119 | catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } 120 | } 121 | } 122 | 123 | New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null 124 | 125 | # Download and Install Apache Maven 126 | Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." 127 | Write-Verbose "Downloading from: $distributionUrl" 128 | Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" 129 | 130 | $webclient = New-Object System.Net.WebClient 131 | if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { 132 | $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) 133 | } 134 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 135 | $webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null 136 | 137 | # If specified, validate the SHA-256 sum of the Maven distribution zip file 138 | $distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum 139 | if ($distributionSha256Sum) { 140 | if ($USE_MVND) { 141 | Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." 142 | } 143 | Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash 144 | if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { 145 | Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." 146 | } 147 | } 148 | 149 | # unzip and move 150 | Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null 151 | 152 | # Find the actual extracted directory name (handles snapshots where filename != directory name) 153 | $actualDistributionDir = "" 154 | 155 | # First try the expected directory name (for regular distributions) 156 | $expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" 157 | $expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" 158 | if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { 159 | $actualDistributionDir = $distributionUrlNameMain 160 | } 161 | 162 | # If not found, search for any directory with the Maven executable (for snapshots) 163 | if (!$actualDistributionDir) { 164 | Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { 165 | $testPath = Join-Path $_.FullName "bin/$MVN_CMD" 166 | if (Test-Path -Path $testPath -PathType Leaf) { 167 | $actualDistributionDir = $_.Name 168 | } 169 | } 170 | } 171 | 172 | if (!$actualDistributionDir) { 173 | Write-Error "Could not find Maven distribution directory in extracted archive" 174 | } 175 | 176 | Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" 177 | Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null 178 | try { 179 | Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null 180 | } catch { 181 | if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { 182 | Write-Error "fail to move MAVEN_HOME" 183 | } 184 | } finally { 185 | try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } 186 | catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } 187 | } 188 | 189 | Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" 190 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [2024] [Yuna Morgenstern] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | berlin.yuna 8 | streamline 9 | 2025.11.3050711 10 | jar 11 | 12 | streamline 13 | Performant, Concurrent, simplified Stream API leveraging Project Loom's virtual threads for efficient concurrent processing. Optimized for multithreaded environments 14 | 15 | https://github.com/YunaBraska/streamline 16 | 17 | 18 | scm:git:ssh://git@github.com/YunaBraska/streamline.git 19 | scm:git:ssh://git@github.com/YunaBraska/streamline.git 20 | https://github.com/YunaBraska/streamline.git 21 | 22 | 23 | 24 | 25 | Yuna Morgenstern 26 | io@yuna.berlin 27 | 28 | 29 | 30 | 31 | 32 | The Apache License, Version 2.0 33 | https://www.apache.org/licenses/LICENSE-2.0.txt 34 | 35 | 36 | 37 | 38 | 39 | 21 40 | UTF-8 41 | ${project.encoding} 42 | ${project.encoding} 43 | 44 | 45 | 6.0.1 46 | 3.27.6 47 | 6.0.1 48 | 49 | 50 | 3.2.7 51 | 3.2.1 52 | 0.8.14 53 | 3.1.0 54 | 3.14.1 55 | 3.5.4 56 | 0.7.0 57 | 58 | 59 | 60 | 61 | 62 | org.junit.jupiter 63 | junit-jupiter-api 64 | ${junit.version} 65 | test 66 | 67 | 68 | org.junit.jupiter 69 | junit-jupiter-engine 70 | ${junit.version} 71 | test 72 | 73 | 74 | org.junit.jupiter 75 | junit-jupiter-params 76 | ${junit.version} 77 | test 78 | 79 | 80 | org.junit.platform 81 | junit-platform-launcher 82 | ${junit-launcher.version} 83 | test 84 | 85 | 86 | org.assertj 87 | assertj-core 88 | ${assertj.version} 89 | test 90 | 91 | 92 | 93 | 94 | 95 | 96 | org.apache.maven.plugins 97 | maven-compiler-plugin 98 | ${maven-compiler-plugin.version} 99 | 100 | ${java-version} 101 | ${java-version} 102 | ${java-version} 103 | 104 | 105 | 106 | org.apache.maven.plugins 107 | maven-surefire-plugin 108 | ${maven-surefire-plugin.version} 109 | 110 | 111 | **/*Test.java 112 | 113 | 114 | 115 | 116 | org.jacoco 117 | jacoco-maven-plugin 118 | ${jacoco-maven-plugin.version} 119 | 120 | 121 | 126 | 127 | 128 | 129 | **/*/persistence/**/* 130 | **/*/target/**/* 131 | 132 | 133 | 134 | 135 | 136 | prepare-agent 137 | 138 | 139 | ${project.build.directory}/jacoco-ut.exec 140 | 141 | 142 | 143 | pre-integration-prepare 144 | 145 | prepare-agent-integration 146 | 147 | 148 | 149 | report 150 | post-integration-test 151 | 152 | merge 153 | 154 | 155 | 156 | 157 | ${project.build.directory} 158 | 159 | *.exec 160 | 161 | 162 | 163 | 164 | 165 | 166 | merged-report-generation 167 | verify 168 | 169 | report 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | release 182 | 183 | 184 | release 185 | true 186 | 187 | false 188 | 189 | 190 | 191 | 192 | 193 | org.apache.maven.plugins 194 | maven-javadoc-plugin 195 | ${maven-javadoc-plugin.version} 196 | 197 | 198 | attach-javadocs 199 | 200 | jar 201 | 202 | 203 | ${java-version} 204 | true 205 | true 206 | 207 | none 208 | false 209 | 210 | 211 | 212 | 213 | 214 | org.apache.maven.plugins 215 | maven-source-plugin 216 | ${maven-source-plugin.version} 217 | 218 | 219 | attach-sources 220 | 221 | jar-no-fork 222 | 223 | 224 | 225 | 226 | 227 | org.apache.maven.plugins 228 | maven-gpg-plugin 229 | ${maven-gpg-plugin.version} 230 | 231 | 232 | sign-artifacts 233 | verify 234 | 235 | sign 236 | 237 | 238 | 239 | 240 | 241 | --pinentry-mode 242 | loopback 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | org.sonatype.central 253 | central-publishing-maven-plugin 254 | ${central-publishing-maven-plugin.version} 255 | true 256 | 257 | central 258 | true 259 | ${project.groupId}:${project.artifactId}:${project.version} 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Apache Maven Wrapper startup batch script, version 3.3.4 23 | # 24 | # Optional ENV vars 25 | # ----------------- 26 | # JAVA_HOME - location of a JDK home dir, required when download maven via java source 27 | # MVNW_REPOURL - repo url base for downloading maven distribution 28 | # MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven 29 | # MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output 30 | # ---------------------------------------------------------------------------- 31 | 32 | set -euf 33 | [ "${MVNW_VERBOSE-}" != debug ] || set -x 34 | 35 | # OS specific support. 36 | native_path() { printf %s\\n "$1"; } 37 | case "$(uname)" in 38 | CYGWIN* | MINGW*) 39 | [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" 40 | native_path() { cygpath --path --windows "$1"; } 41 | ;; 42 | esac 43 | 44 | # set JAVACMD and JAVACCMD 45 | set_java_home() { 46 | # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched 47 | if [ -n "${JAVA_HOME-}" ]; then 48 | if [ -x "$JAVA_HOME/jre/sh/java" ]; then 49 | # IBM's JDK on AIX uses strange locations for the executables 50 | JAVACMD="$JAVA_HOME/jre/sh/java" 51 | JAVACCMD="$JAVA_HOME/jre/sh/javac" 52 | else 53 | JAVACMD="$JAVA_HOME/bin/java" 54 | JAVACCMD="$JAVA_HOME/bin/javac" 55 | 56 | if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then 57 | echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 58 | echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 59 | return 1 60 | fi 61 | fi 62 | else 63 | JAVACMD="$( 64 | 'set' +e 65 | 'unset' -f command 2>/dev/null 66 | 'command' -v java 67 | )" || : 68 | JAVACCMD="$( 69 | 'set' +e 70 | 'unset' -f command 2>/dev/null 71 | 'command' -v javac 72 | )" || : 73 | 74 | if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then 75 | echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 76 | return 1 77 | fi 78 | fi 79 | } 80 | 81 | # hash string like Java String::hashCode 82 | hash_string() { 83 | str="${1:-}" h=0 84 | while [ -n "$str" ]; do 85 | char="${str%"${str#?}"}" 86 | h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) 87 | str="${str#?}" 88 | done 89 | printf %x\\n $h 90 | } 91 | 92 | verbose() { :; } 93 | [ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } 94 | 95 | die() { 96 | printf %s\\n "$1" >&2 97 | exit 1 98 | } 99 | 100 | trim() { 101 | # MWRAPPER-139: 102 | # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. 103 | # Needed for removing poorly interpreted newline sequences when running in more 104 | # exotic environments such as mingw bash on Windows. 105 | printf "%s" "${1}" | tr -d '[:space:]' 106 | } 107 | 108 | scriptDir="$(dirname "$0")" 109 | scriptName="$(basename "$0")" 110 | 111 | # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties 112 | while IFS="=" read -r key value; do 113 | case "${key-}" in 114 | distributionUrl) distributionUrl=$(trim "${value-}") ;; 115 | distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; 116 | esac 117 | done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" 118 | [ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" 119 | 120 | case "${distributionUrl##*/}" in 121 | maven-mvnd-*bin.*) 122 | MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ 123 | case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in 124 | *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; 125 | :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; 126 | :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; 127 | :Linux*x86_64*) distributionPlatform=linux-amd64 ;; 128 | *) 129 | echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 130 | distributionPlatform=linux-amd64 131 | ;; 132 | esac 133 | distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" 134 | ;; 135 | maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; 136 | *) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; 137 | esac 138 | 139 | # apply MVNW_REPOURL and calculate MAVEN_HOME 140 | # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ 141 | [ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" 142 | distributionUrlName="${distributionUrl##*/}" 143 | distributionUrlNameMain="${distributionUrlName%.*}" 144 | distributionUrlNameMain="${distributionUrlNameMain%-bin}" 145 | MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" 146 | MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" 147 | 148 | exec_maven() { 149 | unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : 150 | exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" 151 | } 152 | 153 | if [ -d "$MAVEN_HOME" ]; then 154 | verbose "found existing MAVEN_HOME at $MAVEN_HOME" 155 | exec_maven "$@" 156 | fi 157 | 158 | case "${distributionUrl-}" in 159 | *?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; 160 | *) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; 161 | esac 162 | 163 | # prepare tmp dir 164 | if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then 165 | clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } 166 | trap clean HUP INT TERM EXIT 167 | else 168 | die "cannot create temp dir" 169 | fi 170 | 171 | mkdir -p -- "${MAVEN_HOME%/*}" 172 | 173 | # Download and Install Apache Maven 174 | verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." 175 | verbose "Downloading from: $distributionUrl" 176 | verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" 177 | 178 | # select .zip or .tar.gz 179 | if ! command -v unzip >/dev/null; then 180 | distributionUrl="${distributionUrl%.zip}.tar.gz" 181 | distributionUrlName="${distributionUrl##*/}" 182 | fi 183 | 184 | # verbose opt 185 | __MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' 186 | [ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v 187 | 188 | # normalize http auth 189 | case "${MVNW_PASSWORD:+has-password}" in 190 | '') MVNW_USERNAME='' MVNW_PASSWORD='' ;; 191 | has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; 192 | esac 193 | 194 | if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then 195 | verbose "Found wget ... using wget" 196 | wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" 197 | elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then 198 | verbose "Found curl ... using curl" 199 | curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" 200 | elif set_java_home; then 201 | verbose "Falling back to use Java to download" 202 | javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" 203 | targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" 204 | cat >"$javaSource" <<-END 205 | public class Downloader extends java.net.Authenticator 206 | { 207 | protected java.net.PasswordAuthentication getPasswordAuthentication() 208 | { 209 | return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); 210 | } 211 | public static void main( String[] args ) throws Exception 212 | { 213 | setDefault( new Downloader() ); 214 | java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); 215 | } 216 | } 217 | END 218 | # For Cygwin/MinGW, switch paths to Windows format before running javac and java 219 | verbose " - Compiling Downloader.java ..." 220 | "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" 221 | verbose " - Running Downloader.java ..." 222 | "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" 223 | fi 224 | 225 | # If specified, validate the SHA-256 sum of the Maven distribution zip file 226 | if [ -n "${distributionSha256Sum-}" ]; then 227 | distributionSha256Result=false 228 | if [ "$MVN_CMD" = mvnd.sh ]; then 229 | echo "Checksum validation is not supported for maven-mvnd." >&2 230 | echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 231 | exit 1 232 | elif command -v sha256sum >/dev/null; then 233 | if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then 234 | distributionSha256Result=true 235 | fi 236 | elif command -v shasum >/dev/null; then 237 | if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then 238 | distributionSha256Result=true 239 | fi 240 | else 241 | echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 242 | echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 243 | exit 1 244 | fi 245 | if [ $distributionSha256Result = false ]; then 246 | echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 247 | echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 248 | exit 1 249 | fi 250 | fi 251 | 252 | # unzip and move 253 | if command -v unzip >/dev/null; then 254 | unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" 255 | else 256 | tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" 257 | fi 258 | 259 | # Find the actual extracted directory name (handles snapshots where filename != directory name) 260 | actualDistributionDir="" 261 | 262 | # First try the expected directory name (for regular distributions) 263 | if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then 264 | if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then 265 | actualDistributionDir="$distributionUrlNameMain" 266 | fi 267 | fi 268 | 269 | # If not found, search for any directory with the Maven executable (for snapshots) 270 | if [ -z "$actualDistributionDir" ]; then 271 | # enable globbing to iterate over items 272 | set +f 273 | for dir in "$TMP_DOWNLOAD_DIR"/*; do 274 | if [ -d "$dir" ]; then 275 | if [ -f "$dir/bin/$MVN_CMD" ]; then 276 | actualDistributionDir="$(basename "$dir")" 277 | break 278 | fi 279 | fi 280 | done 281 | set -f 282 | fi 283 | 284 | if [ -z "$actualDistributionDir" ]; then 285 | verbose "Contents of $TMP_DOWNLOAD_DIR:" 286 | verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" 287 | die "Could not find Maven distribution directory in extracted archive" 288 | fi 289 | 290 | verbose "Found extracted Maven distribution directory: $actualDistributionDir" 291 | printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" 292 | mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" 293 | 294 | clean || : 295 | exec_maven "$@" 296 | -------------------------------------------------------------------------------- /src/test/java/berlin/yuna/streamline/model/StreamLineTest.java: -------------------------------------------------------------------------------- 1 | package berlin.yuna.streamline.model; 2 | 3 | import org.junit.jupiter.api.RepeatedTest; 4 | 5 | import java.util.AbstractMap; 6 | import java.util.ArrayList; 7 | import java.util.Collection; 8 | import java.util.List; 9 | import java.util.concurrent.CopyOnWriteArrayList; 10 | import java.util.concurrent.Executors; 11 | import java.util.concurrent.atomic.AtomicInteger; 12 | import java.util.stream.*; 13 | 14 | import static org.assertj.core.api.Assertions.assertThat; 15 | import static org.assertj.core.api.Assertions.assertThatThrownBy; 16 | 17 | class StreamLineTest { 18 | 19 | // Ensure concurrency safety 20 | public static final int TEST_REPEAT = 256; 21 | 22 | @RepeatedTest(TEST_REPEAT) 23 | void testAdvanceCases() { 24 | assertThat(StreamLine.of(1, 2, 3, 4, 5) 25 | .map(x -> x + 1) 26 | .map(String::valueOf) 27 | .map(Integer::valueOf) 28 | .filter(x -> x > 3) 29 | .findFirst()).contains(4); 30 | 31 | assertThat(StreamLine.of(1, 2, 3, 4, 5) 32 | .map(x -> x + 1) 33 | .map(String::valueOf) 34 | .map(Integer::valueOf) 35 | .filter(x -> x > 3) 36 | .collect(Collectors.toList())).containsExactly(4, 5, 6); 37 | 38 | assertThat(StreamLine.of(1, 2, 3, 4, 5) 39 | .map(x -> x + 1) 40 | .map(String::valueOf) 41 | .map(Integer::valueOf) 42 | .filter(x -> x > 3) 43 | .toList()).containsExactly(4, 5, 6); 44 | } 45 | 46 | @RepeatedTest(TEST_REPEAT) 47 | void testMappings() { 48 | assertThat(Stream.of(1, 2, 3, 4, 5).mapToInt(x -> x + 1)).containsExactly(2, 3, 4, 5, 6); 49 | assertThat(StreamLine.of(1, 2, 3, 4, 5).mapToInt(x -> x + 1)).containsExactly(2, 3, 4, 5, 6); 50 | 51 | assertThat(Stream.of(1, 2, 3, 4, 5).mapToLong(x -> x + 1)).containsExactly(2L, 3L, 4L, 5L, 6L); 52 | assertThat(StreamLine.of(1, 2, 3, 4, 5).mapToLong(x -> x + 1)).containsExactly(2L, 3L, 4L, 5L, 6L); 53 | 54 | assertThat(Stream.of(1, 2, 3, 4, 5).mapToDouble(x -> x + 1)).containsExactly(2d, 3d, 4d, 5d, 6d); 55 | assertThat(StreamLine.of(1, 2, 3, 4, 5).mapToDouble(x -> x + 1)).containsExactly(2d, 3d, 4d, 5d, 6d); 56 | 57 | assertThat(Stream.of(List.of(1, 2, 3, 4, 5)).flatMap(Collection::stream)).containsExactly(1, 2, 3, 4, 5); 58 | assertThat(StreamLine.of(List.of(1, 2, 3, 4, 5)).flatMap(Collection::stream)).containsExactly(1, 2, 3, 4, 5); 59 | 60 | assertThat(Stream.of(1, 2, 3, 4, 5).flatMapToInt(IntStream::of)).containsExactly(1, 2, 3, 4, 5); 61 | assertThat(StreamLine.of(1, 2, 3, 4, 5).flatMapToInt(IntStream::of)).containsExactly(1, 2, 3, 4, 5); 62 | 63 | assertThat(Stream.of(1, 2, 3, 4, 5).flatMapToLong(LongStream::of)).containsExactly(1L, 2L, 3L, 4L, 5L); 64 | assertThat(StreamLine.of(1, 2, 3, 4, 5).flatMapToLong(LongStream::of)).containsExactly(1L, 2L, 3L, 4L, 5L); 65 | 66 | assertThat(Stream.of(1, 2, 3, 4, 5).flatMapToDouble(DoubleStream::of)).containsExactly(1d, 2d, 3d, 4d, 5d); 67 | assertThat(StreamLine.of(1, 2, 3, 4, 5).flatMapToDouble(DoubleStream::of)).containsExactly(1d, 2d, 3d, 4d, 5d); 68 | } 69 | 70 | @RepeatedTest(TEST_REPEAT) 71 | void testDistinct() { 72 | assertThat(Stream.of("AA", "AA", "BB", "BB", "CC").distinct().toList()).containsExactly("AA", "BB", "CC"); 73 | assertThat(StreamLine.of("AA", "AA", "BB", "BB", "CC").distinct().toList()).containsExactly("AA", "BB", "CC"); 74 | } 75 | 76 | @RepeatedTest(TEST_REPEAT) 77 | void testSort() { 78 | assertThat(Stream.of("CC", "AA", "BB").sorted().toList()).containsExactly("AA", "BB", "CC"); 79 | assertThat(StreamLine.of("CC", "AA", "BB").sorted().toList()).containsExactly("AA", "BB", "CC"); 80 | } 81 | 82 | @RepeatedTest(TEST_REPEAT) 83 | void testPeek() { 84 | final CopyOnWriteArrayList peeks = new CopyOnWriteArrayList<>(); 85 | assertThat(Stream.of("AA", "BB", "CC").sorted().peek(peeks::add).toList()).containsExactly("AA", "BB", "CC"); 86 | assertThat(peeks).contains("AA", "BB", "CC"); 87 | assertThat(StreamLine.of("AA", "BB", "CC").sorted().peek(peeks::add).toList()).containsExactly("AA", "BB", "CC"); 88 | assertThat(peeks).contains("AA", "BB", "CC", "AA", "BB", "CC"); 89 | } 90 | 91 | @RepeatedTest(TEST_REPEAT) 92 | void testSkipAndLimit() { 93 | assertThat(Stream.of("AA", "BB", "CC", "DD", "EE", "FF").skip(2).limit(2).toList()).containsExactly("CC", "DD"); 94 | assertThat(StreamLine.of("AA", "BB", "CC", "DD", "EE", "FF").skip(2).limit(2).toList()).containsExactly("CC", "DD"); 95 | } 96 | 97 | @RepeatedTest(TEST_REPEAT) 98 | void testRange() { 99 | assertThat(IntStream.range(2, 8).boxed().toList()).containsExactly(2, 3, 4, 5, 6, 7); 100 | assertThat(StreamLine.range(2, 8).toList()).containsExactly(2, 3, 4, 5, 6, 7); 101 | assertThat(StreamLine.range(Executors.newThreadPerTaskExecutor(Thread.ofVirtual().name("virtual-thread-", 0).factory()), 2, 8).toList()).containsExactly(2, 3, 4, 5, 6, 7); 102 | assertThat(StreamLine.range(8).toList()).containsExactly(0, 1, 2, 3, 4, 5, 6, 7); 103 | } 104 | 105 | @RepeatedTest(TEST_REPEAT) 106 | void testFindAny() { 107 | assertThat(Stream.of(1, 2, 3, 4, 5).findAny().get()).isPositive().isLessThan(6); 108 | assertThat(StreamLine.of(1, 2, 3, 4, 5).findAny().get()).isPositive().isLessThan(6); 109 | } 110 | 111 | @RepeatedTest(TEST_REPEAT) 112 | void testIterator() { 113 | assertThat(Stream.of(1, 2, 3, 4, 5).iterator().next()).isEqualTo(1); 114 | assertThat(StreamLine.of(1, 2, 3, 4, 5).iterator().next()).isEqualTo(1); 115 | } 116 | 117 | @RepeatedTest(TEST_REPEAT) 118 | void testSpliterator() { 119 | assertThat(Stream.of(1, 2, 3, 4, 5).spliterator().characteristics()).isEqualTo(17488); 120 | // StreamLine is consistent and independent of the source value 121 | assertThat(StreamLine.of(1, 2, 3, 4, 5).spliterator().characteristics()).isEqualTo(16464); 122 | } 123 | 124 | @RepeatedTest(TEST_REPEAT) 125 | void testCloseStream() { 126 | final AtomicInteger count = new AtomicInteger(0); 127 | final Stream closeStream1 = Stream.of(1, 2, 3, 4, 5).onClose(count::incrementAndGet); 128 | final Stream closeStream2 = StreamLine.of(1, 2, 3, 4, 5).onClose(count::incrementAndGet); 129 | assertThat(count).hasValue(0); 130 | closeStream1.close(); 131 | assertThat(count).hasValue(1); 132 | closeStream2.close(); 133 | assertThat(count).hasValue(2); 134 | } 135 | 136 | @RepeatedTest(TEST_REPEAT) 137 | void testUnorderedProcessing() { 138 | assertThat(Stream.of(1, 2, 3, 4, 5).unordered().toList()).contains(1, 2, 3, 4, 5); 139 | assertThat(StreamLine.of(1, 2, 3, 4, 5).unordered().toList()).contains(1, 2, 3, 4, 5); 140 | } 141 | 142 | @RepeatedTest(TEST_REPEAT) 143 | void testSequentialProcessing() { 144 | assertThat(Stream.of(1, 2, 3, 4, 5).sequential().isParallel()).isFalse(); 145 | assertThat(StreamLine.of(1, 2, 3, 4, 5).sequential().isParallel()).isFalse(); 146 | 147 | assertThat(Stream.of(1, 2, 3, 4, 5).sequential().toList()).containsExactly(1, 2, 3, 4, 5); 148 | assertThat(StreamLine.of(1, 2, 3, 4, 5).sequential().toList()).containsExactly(1, 2, 3, 4, 5); 149 | } 150 | 151 | @RepeatedTest(TEST_REPEAT) 152 | void testParallelProcessing() { 153 | assertThat(Stream.of(1, 2, 3, 4, 5).parallel().isParallel()).isTrue(); 154 | assertThat(StreamLine.of(1, 2, 3, 4, 5).parallel().isParallel()).isTrue(); 155 | 156 | assertThat(Stream.of(1, 2, 3, 4, 5).parallel().toList()).containsExactly(1, 2, 3, 4, 5); 157 | assertThat(StreamLine.of(1, 2, 3, 4, 5).parallel().toList()).containsExactly(1, 2, 3, 4, 5); 158 | } 159 | 160 | @RepeatedTest(TEST_REPEAT) 161 | void testForEach() { 162 | final CopyOnWriteArrayList peeks = new CopyOnWriteArrayList<>(); 163 | Stream.of(1, 2, 3, 4, 5).forEach(integer -> peeks.add(integer.toString())); 164 | assertThat(peeks).contains("1", "2", "3", "4", "5"); 165 | peeks.clear(); 166 | StreamLine.of(1, 2, 3, 4, 5).forEach(integer -> peeks.add(integer.toString())); 167 | assertThat(peeks).contains("1", "2", "3", "4", "5"); 168 | peeks.clear(); 169 | StreamLine.of(1, 2, 3, 4, 5).forEachSync(integer -> peeks.add(integer.toString())); 170 | assertThat(peeks).contains("1", "2", "3", "4", "5"); 171 | peeks.clear(); 172 | Stream.of(1, 2, 3, 4, 5).forEachOrdered(integer -> peeks.add(integer.toString())); 173 | assertThat(peeks).containsExactly("1", "2", "3", "4", "5"); 174 | peeks.clear(); 175 | StreamLine.of(1, 2, 3, 4, 5).forEachOrdered(integer -> peeks.add(integer.toString())); 176 | assertThat(peeks).containsExactly("1", "2", "3", "4", "5"); 177 | } 178 | 179 | @RepeatedTest(TEST_REPEAT) 180 | void testToArray() { 181 | assertThat(Stream.of(1, 2, 3, 4, 5).toArray()).containsExactly(1, 2, 3, 4, 5); 182 | assertThat(StreamLine.of(1, 2, 3, 4, 5).toArray()).containsExactly(1, 2, 3, 4, 5); 183 | 184 | assertThat(Stream.of(1, 2, 3, 4, 5).toArray(Integer[]::new)).containsExactly(1, 2, 3, 4, 5); 185 | assertThat(StreamLine.of(1, 2, 3, 4, 5).toArray(Integer[]::new)).containsExactly(1, 2, 3, 4, 5); 186 | } 187 | 188 | @RepeatedTest(TEST_REPEAT) 189 | void testReduce() { 190 | assertThat(Stream.of(1, 2, 3, 4, 5).reduce(Integer::sum)).contains(15); 191 | assertThat(StreamLine.of(1, 2, 3, 4, 5).reduce(Integer::sum)).contains(15); 192 | 193 | assertThat(Stream.of(1, 2, 3, 4, 5).reduce(2, Integer::sum)).isEqualTo(17); 194 | assertThat(StreamLine.of(1, 2, 3, 4, 5).reduce(2, Integer::sum)).isEqualTo(17); 195 | 196 | assertThat(Stream.of(3, 1, 4, 1, 5).reduce(Integer::max)).contains(5); 197 | assertThat(StreamLine.of(3, 1, 4, 1, 5).reduce(Integer::max)).contains(5); 198 | } 199 | 200 | @RepeatedTest(TEST_REPEAT) 201 | void testMathFunctions() { 202 | assertThat(Stream.of(3, 1, 4, 1, 5).count()).isEqualTo(5); 203 | assertThat(StreamLine.of(3, 1, 4, 1, 5).count()).isEqualTo(5); 204 | 205 | assertThat(Stream.of(3, 1, 4, 1, 5).max(Integer::compareTo)).contains(5); 206 | assertThat(StreamLine.of(3, 1, 4, 1, 5).max(Integer::compareTo)).contains(5); 207 | assertThat(StreamLine.of(3, 1, 4, 1, 5).max().orElse(-1)).isEqualTo(5); 208 | 209 | assertThat(Stream.of(3, 1, 4, 1, 5).min(Integer::compareTo)).contains(1); 210 | assertThat(StreamLine.of(3, 1, 4, 1, 5).min(Integer::compareTo)).contains(1); 211 | assertThat(StreamLine.of(3, 1, 4, 1, 5).min().orElse(-1)).isEqualTo(1); 212 | 213 | assertThat(StreamLine.of(3, 1, 4, 1, 5).average().orElse(-1)).isEqualTo(2.8); 214 | assertThat(StreamLine.of(3, 1, 4, 1, 5).statistics()).isNotNull(); 215 | assertThat(StreamLine.of(3, 1, 4, 1, 5).sum()).isEqualTo(14); 216 | assertThat(StreamLine.of("1", "2", "3", "4", "5").average()).isEmpty(); 217 | assertThat(StreamLine.of("1", "2", "3", "4", "5").statistics()).isNotNull(); 218 | assertThat(StreamLine.of("1", "2", "3", "4", "5").sum()).isZero(); 219 | } 220 | 221 | @RepeatedTest(TEST_REPEAT) 222 | void testAllMatch() { 223 | assertThat(Stream.of(3, 1, 4, 1, 5).allMatch(integer -> integer == 1)).isFalse(); 224 | assertThat(StreamLine.of(3, 1, 4, 1, 5).allMatch(integer -> integer == 1)).isFalse(); 225 | assertThat(Stream.of(3, 1, 4, 1, 5).allMatch(integer -> integer > 0 && integer < 6)).isTrue(); 226 | assertThat(StreamLine.of(3, 1, 4, 1, 5).allMatch(integer -> integer > 0 && integer < 6)).isTrue(); 227 | } 228 | 229 | @RepeatedTest(TEST_REPEAT) 230 | void testAnyMatch() { 231 | assertThat(Stream.of(3, 1, 4, 1, 5).anyMatch(integer -> integer == 1)).isTrue(); 232 | assertThat(StreamLine.of(3, 1, 4, 1, 5).anyMatch(integer -> integer == 1)).isTrue(); 233 | assertThat(Stream.of(3, 1, 4, 1, 5).anyMatch(integer -> integer == 6)).isFalse(); 234 | assertThat(StreamLine.of(3, 1, 4, 1, 5).anyMatch(integer -> integer == 6)).isFalse(); 235 | } 236 | 237 | @RepeatedTest(TEST_REPEAT) 238 | void testNoneMatch() { 239 | assertThat(Stream.of(3, 1, 4, 1, 5).noneMatch(integer -> integer == 1)).isFalse(); 240 | assertThat(StreamLine.of(3, 1, 4, 1, 5).noneMatch(integer -> integer == 1)).isFalse(); 241 | assertThat(Stream.of(3, 1, 4, 1, 5).noneMatch(integer -> integer == 6)).isTrue(); 242 | assertThat(StreamLine.of(3, 1, 4, 1, 5).noneMatch(integer -> integer == 6)).isTrue(); 243 | } 244 | 245 | @RepeatedTest(TEST_REPEAT) 246 | void testException() { 247 | assertThatThrownBy(() -> Stream.of(3, 1, 4, 1, 5).noneMatch(integer -> { 248 | throw new RuntimeException("Test Error"); 249 | })).isInstanceOf(RuntimeException.class).hasMessage("Test Error"); 250 | assertThatThrownBy(() -> StreamLine.of(3, 1, 4, 1, 5).noneMatch(integer -> { 251 | throw new RuntimeException("Test Error"); 252 | })).isInstanceOf(RuntimeException.class).hasMessage("Test Error"); 253 | } 254 | 255 | @RepeatedTest(TEST_REPEAT) 256 | void testReduceWithIdentityAndAccumulator() { 257 | assertThat(Stream.of(1, 2, 3, 4, 5).reduce(0, (a, b) -> a + b, Integer::sum)).isEqualTo(15); 258 | assertThat(StreamLine.of(1, 2, 3, 4, 5).reduce(0, (a, b) -> a + b, Integer::sum)).isEqualTo(15); 259 | 260 | assertThat(Stream.of("a", "b", "c").reduce("", (a, b) -> a + b, String::concat)).isEqualTo("abc"); 261 | assertThat(StreamLine.of("a", "b", "c").reduce("", (a, b) -> a + b, String::concat)).isEqualTo("abc"); 262 | } 263 | 264 | @RepeatedTest(TEST_REPEAT) 265 | void testCollectToList() { 266 | assertThat((List) Stream.of(1, 2, 3, 4, 5).collect(ArrayList::new, List::add, List::addAll)).isEqualTo(List.of(1, 2, 3, 4, 5)); 267 | assertThat((List) StreamLine.of(1, 2, 3, 4, 5).collect(ArrayList::new, List::add, List::addAll)).isEqualTo(List.of(1, 2, 3, 4, 5)); 268 | } 269 | 270 | @RepeatedTest(TEST_REPEAT) 271 | void testCollectGrouping() { 272 | assertThat(Stream.of(3, 1, 4, 1, 5).collect(Collectors.groupingBy(integer -> integer == 1))) 273 | .contains(new AbstractMap.SimpleEntry<>(true, List.of(1, 1)), new AbstractMap.SimpleEntry<>(false, List.of(3, 4, 5))); 274 | assertThat(StreamLine.of(3, 1, 4, 1, 5).collect(Collectors.groupingBy(integer -> integer == 1))) 275 | .contains(new AbstractMap.SimpleEntry<>(true, List.of(1, 1)), new AbstractMap.SimpleEntry<>(false, List.of(3, 4, 5))); 276 | } 277 | 278 | 279 | @RepeatedTest(TEST_REPEAT) 280 | void TestAccessors() { 281 | final StreamLine stream = StreamLine.of(1, 2, 3, 4, 5); 282 | assertThat(stream.ordered()).isTrue(); 283 | assertThat(stream.ordered(false).ordered()).isFalse(); 284 | assertThat(stream.threads(1).threads()).isEqualTo(1); 285 | assertThat(stream.threads(2).threads()).isEqualTo(2); 286 | assertThat(stream.executor()).isNotNull(); 287 | } 288 | } 289 | -------------------------------------------------------------------------------- /src/main/java/berlin/yuna/streamline/model/StreamLine.java: -------------------------------------------------------------------------------- 1 | package berlin.yuna.streamline.model; 2 | 3 | import java.util.*; 4 | import java.util.concurrent.*; 5 | import java.util.concurrent.atomic.AtomicBoolean; 6 | import java.util.concurrent.atomic.AtomicInteger; 7 | import java.util.function.*; 8 | import java.util.stream.*; 9 | 10 | /** 11 | * {@link StreamLine} provides a simplified, high-performance Stream API utilizing exchangeable {@link ExecutorService}, 12 | * with a focus on leveragingProject Loom's virtual and non-blocking threads for efficient concurrent processing ({@link StreamLine#VIRTUAL_EXECUTOR}). 13 | * Unlike the default {@link Stream#parallel()}, {@link StreamLine} is optimized for multithreaded environments showcasing superior performance with a design that avoids the common pitfalls of resource management in stream operations. 14 | *

Usage Example: 15 | *

 16 |  * {@link StreamLine}.of("one", "two", "three")
 17 |  *           .threads(-1) // unlimited threads
 18 |  *           .forEach(System.out::println);
 19 |  * 
20 | *

Performance and Scalability: 21 | * {@link StreamLine} outperforms standard Java {@link Stream} in concurrent scenarios: 22 | * Tested 10 Concurrent Streams with 10 Tasks each (10 Cores CPU). 23 | *

    24 | *
  • Loop [for]: 1.86s
  • 25 | *
  • {@link Stream} [Sequential]: 1.29s
  • 26 | *
  • {@link Stream} [Parallel]: 724ms
  • 27 | *
  • {@link StreamLine} [Ordered]: 118ms
  • 28 | *
  • {@link StreamLine} [Unordered]: 109ms
  • 29 | *
  • {@link StreamLine} [2 Threads]: 500ms
  • 30 | *
31 | *

Additional Methods: 32 | * {@link StreamLine} comes with additional methods out of the box to avoid performance loss at {@link IntStream}, {@link LongStream} and {@link DoubleStream} 33 | *

    34 | *
  • {@link StreamLine#range(int, int)}: same as {@link IntStream#range(int, int)}
  • 35 | *
  • {@link StreamLine#count()}: same as {@link IntStream#count()}
  • 36 | *
  • {@link StreamLine#sum()}: same as {@link IntStream#sum()}
  • 37 | *
  • {@link StreamLine#max()}: same as {@link IntStream#max()}
  • 38 | *
  • {@link StreamLine#min()}: same as {@link IntStream#min()}
  • 39 | *
  • {@link StreamLine#average()}: same as {@link IntStream#average()}
  • 40 | *
  • {@link StreamLine#statistics()}: same as {@link IntStream#summaryStatistics()}
  • 41 | *
42 | *

Note on Concurrency: 43 | * Be mindful when handling functions like {@link Stream#forEach(Consumer)}; This function calls the consumer concurrently. 44 | * This behaviour is the same as in {@link Stream#parallel()} but its more noticeable due to the performance of {@link StreamLine}. 45 | *

Limitations: 46 | * The concurrent processing does not extend to operations returning type-specific streams like {@link IntStream}, {@link LongStream}, {@link DoubleStream}, {@link OptionalInt}, {@link OptionalLong}, {@link OptionalDouble}, etc. 47 | * {@link StreamLine} has more Terminal operations due its simple design 48 | *

49 | * 50 | * @param the type of the stream elements 51 | */ 52 | @SuppressWarnings({"unchecked", "java:S1905"}) // Suppress SonarLint warning about casting to T 53 | public class StreamLine implements Stream { 54 | private final T[] source; 55 | private final ExecutorService executor; 56 | private final List> operations = new ArrayList<>(); 57 | private boolean ordered = true; 58 | private int threads; 59 | private Runnable closeHandler; 60 | public static final ExecutorService VIRTUAL_EXECUTOR = Executors.newThreadPerTaskExecutor(Thread.ofVirtual().name("virtual-thread-", 0).factory()); 61 | 62 | /** 63 | * Constructs a stream with a custom executor and source elements. 64 | * 65 | * @param executor [Optional] The executor to handle parallel processing. 66 | * @param values The source elements for the stream. 67 | */ 68 | public StreamLine(final ExecutorService executor, final T... values) { 69 | this.source = values; 70 | this.executor = executor != null ? executor : VIRTUAL_EXECUTOR; 71 | threads = executor == null ? Math.max(2, Runtime.getRuntime().availableProcessors() / 2) : 10; 72 | } 73 | 74 | /** 75 | * Creates a {@link StreamLine}. from given elements. 76 | * 77 | * @param values The elements to include in the new stream. 78 | * @return A new {@link StreamLine}. 79 | */ 80 | public static StreamLine of(final T... values) { 81 | return of(null, values); 82 | } 83 | 84 | /** 85 | * Creates a {@link StreamLine}. from given elements and a custom executor. 86 | * 87 | * @param executor [Optional] The executor for parallel processing. 88 | * @param values The elements to include in the new stream. 89 | * @return A new {@link StreamLine}.. 90 | */ 91 | public static StreamLine of(final ExecutorService executor, final T... values) { 92 | return new StreamLine<>(executor, values); 93 | } 94 | 95 | /** 96 | * Creates a {@link StreamLine}. from a single element. 97 | * 98 | * @param value The single element to create the stream from. 99 | * @return A new {@link StreamLine}.. 100 | */ 101 | public static StreamLine of(final T value) { 102 | return of(null, (T[]) new Object[]{value}); 103 | } 104 | 105 | /** 106 | * Creates a {@link StreamLine}. from a single element with a custom executor. 107 | * 108 | * @param executor [Optional] The executor for parallel processing. 109 | * @param value The single element to create the stream from. 110 | * @return A new {@link StreamLine}.. 111 | */ 112 | public static StreamLine of(final ExecutorService executor, final T value) { 113 | return of(executor, (T[]) new Object[]{value}); 114 | } 115 | 116 | /** 117 | * Creates a {@link StreamLine}. representing a range of integers. 118 | * 119 | * @param endExclusive The end (exclusive) of the range. 120 | * @return A new {@link StreamLine}.. 121 | */ 122 | public static StreamLine range(final int endExclusive) { 123 | return range(null, 0, endExclusive); 124 | } 125 | 126 | /** 127 | * Creates a {@link StreamLine}. representing a range of integers. 128 | * 129 | * @param startInclusive The start (inclusive) of the range. 130 | * @param endExclusive The end (exclusive) of the range. 131 | * @return A new {@link StreamLine}.. 132 | */ 133 | public static StreamLine range(final int startInclusive, final int endExclusive) { 134 | return range(null, startInclusive, endExclusive); 135 | } 136 | 137 | /** 138 | * Creates a {@link StreamLine}. representing a range of integers with a custom executor. 139 | * 140 | * @param executor [Optional] The executor for parallel processing. 141 | * @param startInclusive The start (inclusive) of the range. 142 | * @param endExclusive The end (exclusive) of the range. 143 | * @return A new {@link StreamLine}.. 144 | */ 145 | public static StreamLine range(final ExecutorService executor, final int startInclusive, final int endExclusive) { 146 | final List range = new ArrayList<>(); 147 | for (int i = (startInclusive > -1 ? startInclusive : 0); i < endExclusive; i++) { 148 | range.add(i); 149 | } 150 | return of(executor, range.toArray(Integer[]::new)); 151 | } 152 | 153 | /** 154 | * Returns whether this stream is ordered. 155 | * 156 | * @return True if the stream is ordered, false otherwise. 157 | */ 158 | public boolean ordered() { 159 | return ordered; 160 | } 161 | 162 | /** 163 | * Sets the ordered state of the stream. 164 | * Intermediate operation 165 | * 166 | * @param ordered Whether the stream should be ordered. 167 | * @return The current {@link StreamLine}.. 168 | */ 169 | public StreamLine ordered(final boolean ordered) { 170 | this.ordered = ordered; 171 | return this; 172 | } 173 | 174 | /** 175 | * Gets the limit of threads available for parallel processing. -1 all available executor threads. 176 | * 177 | * @return The number of threads. 178 | */ 179 | public int threads() { 180 | return threads; 181 | } 182 | 183 | /** 184 | * Sets the limit of threads for parallel processing. -1 all available executor threads. 185 | * Intermediate operation 186 | * 187 | * @param threads The number of threads to use. 188 | * @return The current {@link StreamLine}.. 189 | */ 190 | public StreamLine threads(final int threads) { 191 | this.threads = threads == 0 ? 1 : threads; 192 | return this; 193 | } 194 | 195 | /** 196 | * Returns the executor associated with this stream. 197 | * 198 | * @return The executor. 199 | */ 200 | public ExecutorService executor() { 201 | return executor; 202 | } 203 | 204 | /** 205 | * Applies a transformation function to each element of the stream. 206 | * Intermediate operation 207 | * 208 | * @param mapper A function to apply to each element. 209 | * @return A stream consisting of the results of applying the given function. 210 | */ 211 | @Override 212 | public Stream map(final Function mapper) { 213 | operations.add((Function) mapper); 214 | return (Stream) this; 215 | } 216 | 217 | /** 218 | * Converts executes all operations and returns a new Stream with the results. 219 | * For Performance, it's recommended to use the usual {@link StreamLine#map(Function)} functions instead. 220 | *

Terminal operation

. 221 | * 222 | * @param mapper A function to convert elements to int values. 223 | * @return A new Stream from the {@link StreamLine} results. 224 | */ 225 | @Override 226 | public IntStream mapToInt(final ToIntFunction mapper) { 227 | operations.add(item -> mapper.applyAsInt((T) item)); 228 | return (isParallel() ? Arrays.stream(executeTerminal()).parallel() : Arrays.stream(executeTerminal())).mapToInt(Integer.class::cast); 229 | } 230 | 231 | /** 232 | * Converts executes all operations and returns a new Stream with the results. 233 | * For Performance, it's recommended to use the usual {@link StreamLine#map(Function)} functions instead. 234 | *

Terminal operation

. 235 | * 236 | * @param mapper A function to convert elements to int values. 237 | * @return A new Stream from the {@link StreamLine} results. 238 | */ 239 | @Override 240 | public LongStream mapToLong(final ToLongFunction mapper) { 241 | operations.add(item -> mapper.applyAsLong((T) item)); 242 | return (isParallel() ? Arrays.stream(executeTerminal()).parallel() : Arrays.stream(executeTerminal())).mapToLong(Long.class::cast); 243 | } 244 | 245 | /** 246 | * Converts executes all operations and returns a new Stream with the results. 247 | * For Performance, it's recommended to use the usual {@link StreamLine#map(Function)} functions instead. 248 | *

Terminal operation

. 249 | * 250 | * @param mapper A function to convert elements to int values. 251 | * @return A new Stream from the {@link StreamLine} results. 252 | */ 253 | @Override 254 | public DoubleStream mapToDouble(final ToDoubleFunction mapper) { 255 | operations.add(item -> mapper.applyAsDouble((T) item)); 256 | return (isParallel() ? Arrays.stream(executeTerminal()).parallel() : Arrays.stream(executeTerminal())).mapToDouble(Double.class::cast); 257 | } 258 | 259 | /** 260 | * Transforms each element into zero or more elements by applying a function to each element. 261 | *

Terminal operation

. 262 | * Differs from {@link Stream#map(Function)} which is Intermediate operation

. 263 | * This closes the streams as soon as possible to keep things simple and continue with clean multi thread operations. 264 | * 265 | * @param mapper A function to apply to each element, which returns a stream of new values. 266 | * @return A new stream consisting of all elements produced by applying the function to each element. 267 | */ 268 | @Override 269 | public Stream flatMap(final Function> mapper) { 270 | operations.add(item -> mapper.apply((T) item)); 271 | return (Stream) StreamLine.of(executor, Arrays.stream(executeTerminal()).flatMap(item -> (Stream) item).toArray()).ordered(ordered).threads(threads); 272 | } 273 | 274 | /** 275 | * Converts elements of this stream to a {@link IntStream} by applying a function that produces a {@link IntStream} for each element. 276 | *

Terminal operation

. 277 | * It's recommended to use the usual {@link StreamLine#map(Function)} as the performance of {@link StreamLine} ends here. 278 | * 279 | * @param mapper A function to apply to each element, which returns a {@link IntStream} of new values. 280 | * @return A new {@link IntStream} consisting of all long values produced by applying the function to each element. 281 | */ 282 | @Override 283 | public IntStream flatMapToInt(final Function mapper) { 284 | operations.add(item -> mapper.apply((T) item)); 285 | return IntStream.of(Arrays.stream(executeTerminal()).flatMapToInt(IntStream.class::cast).toArray()); 286 | } 287 | 288 | /** 289 | * Converts elements of this stream to a {@link LongStream} by applying a function that produces a {@link LongStream} for each element. 290 | *

Terminal operation

. 291 | * It's recommended to use the usual {@link StreamLine#map(Function)} as the performance of {@link StreamLine} ends here. 292 | * 293 | * @param mapper A function to apply to each element, which returns a {@link LongStream} of new values. 294 | * @return A new {@link LongStream} consisting of all long values produced by applying the function to each element. 295 | */ 296 | @Override 297 | public LongStream flatMapToLong(final Function mapper) { 298 | operations.add(item -> mapper.apply((T) item)); 299 | return LongStream.of(Arrays.stream(executeTerminal()).flatMapToLong(LongStream.class::cast).toArray()); 300 | } 301 | 302 | /** 303 | * Converts elements of this stream to a {@link DoubleStream} by applying a function that produces a {@link DoubleStream} for each element. 304 | *

Terminal operation

. 305 | * It's recommended to use the usual {@link StreamLine#map(Function)} as the performance of {@link StreamLine} ends here. 306 | * 307 | * @param mapper A function to apply to each element, which returns a {@link DoubleStream} of new values. 308 | * @return A new {@link DoubleStream} consisting of all long values produced by applying the function to each element. 309 | */ 310 | @Override 311 | public DoubleStream flatMapToDouble(final Function mapper) { 312 | operations.add(item -> mapper.apply((T) item)); 313 | return DoubleStream.of(Arrays.stream(executeTerminal()).flatMapToDouble(DoubleStream.class::cast).toArray()); 314 | } 315 | 316 | /** 317 | * Returns a stream consisting of distinct elements (according to Object.equals(Object)). 318 | * Intermediate operation 319 | * 320 | * @return A stream consisting of the distinct elements of this stream. 321 | */ 322 | @Override 323 | public Stream distinct() { 324 | final Set seen = ConcurrentHashMap.newKeySet(); 325 | operations.add(item -> seen.add((T) item) ? item : null); 326 | return this; 327 | } 328 | 329 | /** 330 | * Returns a stream consisting of the elements of this stream, sorted according to natural order. 331 | * Intermediate operation 332 | * 333 | * @return A stream consisting of the sorted elements of this stream. 334 | */ 335 | @Override 336 | public Stream sorted() { 337 | return sorted(null); 338 | } 339 | 340 | /** 341 | * Returns a stream consisting of the elements of this stream, sorted according to the provided Comparator. 342 | * Terminal operation 343 | * 344 | * @param comparator A Comparator to be used to compare stream elements. 345 | * @return A new stream consisting of the sorted elements of this stream. 346 | */ 347 | @Override 348 | public Stream sorted(final Comparator comparator) { 349 | final T[] values = executeTerminal(); 350 | Arrays.sort(values, comparator); 351 | return StreamLine.of(executor, values).ordered(ordered).threads(threads); 352 | } 353 | 354 | /** 355 | * Returns a stream consisting of the elements of this stream, each modified by the given function. 356 | * Intermediate operation 357 | * 358 | * @param action A non-interfering action to perform on the elements as they are consumed from the stream. 359 | * @return A stream consisting of the elements after applying the given action. 360 | */ 361 | @Override 362 | public Stream peek(final Consumer action) { 363 | operations.add(item -> { 364 | action.accept((T) item); 365 | return item; 366 | }); 367 | return this; 368 | } 369 | 370 | /** 371 | * Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length. 372 | * Terminal operation 373 | * 374 | * @param maxSize The maximum number of elements the stream should be limited to. 375 | * @return A new stream consisting of the elements of this stream, truncated to maxSize in length. 376 | */ 377 | @Override 378 | public Stream limit(final long maxSize) { 379 | final T[] values = executeTerminal(); 380 | return maxSize < 1 || maxSize > values.length ? this : new StreamLine<>(executor, Arrays.copyOfRange(values, 0, (int) Math.min(maxSize, values.length))).ordered(ordered).threads(threads); 381 | } 382 | 383 | /** 384 | * Returns a stream consisting of the remaining elements of this stream after discarding the first n elements. 385 | * Terminal operation 386 | * 387 | * @param n The number of leading elements to skip. 388 | * @return A new stream consisting of the remaining elements of this stream after skipping the first n elements. 389 | */ 390 | @Override 391 | public Stream skip(final long n) { 392 | final T[] values = executeTerminal(); 393 | return n < 1 ? this : new StreamLine<>(executor, Arrays.copyOfRange(values, (int) Math.min(n, values.length), values.length)).ordered(ordered).threads(threads); 394 | } 395 | 396 | /** 397 | * Returns a stream consisting of the elements of this stream that match the given predicate. 398 | * Intermediate operation 399 | * 400 | * @param predicate A predicate to apply to each element to determine if it should be included. 401 | * @return A stream consisting of the elements of this stream that match the given predicate. 402 | */ 403 | @Override 404 | public Stream filter(final Predicate predicate) { 405 | operations.add(item -> predicate.test((T) item) ? item : null); 406 | return this; 407 | } 408 | 409 | /** 410 | * Returns an Optional describing the first element of this stream, or an empty Optional if the stream is empty. 411 | * When order does not matter, then {@link StreamLine#findAny()} is recommended to keep the performance and close the stream as soon as possible. 412 | * Terminal operation 413 | * 414 | * @return An Optional describing the first element of this stream or an empty Optional if the stream is empty. 415 | */ 416 | @Override 417 | public Optional findFirst() { 418 | final T[] result = executeTerminal(true, false); 419 | return result.length == 0 ? Optional.empty() : Optional.ofNullable(result[0]); 420 | } 421 | 422 | /** 423 | * Returns an Optional describing some element of the stream, or an empty Optional if the stream is empty. This is a non-deterministic version of {@link StreamLine#findFirst()}. 424 | * Terminal operation 425 | * 426 | * @return An Optional describing some element of the stream, or an empty Optional if the stream is empty. 427 | */ 428 | @Override 429 | public Optional findAny() { 430 | final T[] array = executeTerminal(true, true); 431 | return Optional.ofNullable(array.length == 0 ? null : array[0]); 432 | } 433 | 434 | /** 435 | * Returns an iterator over the elements in this stream. 436 | * Terminal operation 437 | * 438 | * @return An Iterator over the elements in this stream. 439 | */ 440 | @Override 441 | public Iterator iterator() { 442 | return List.of(executeTerminal()).iterator(); 443 | } 444 | 445 | /** 446 | * Creates a Spliterator over the elements in this stream. 447 | * Terminal operation 448 | * 449 | * @return (16464) A Spliterator over the elements in this stream. 450 | * This spliterator is consistent and independent of the result of the stream pipeline. 451 | */ 452 | @Override 453 | public Spliterator spliterator() { 454 | return List.of(executeTerminal()).spliterator(); 455 | } 456 | 457 | /** 458 | * Returns a sequential stream considering all operations are to be performed in encounter order. 459 | * Intermediate operation 460 | * Sets {@link StreamLine#threads} to 1 - see {@link StreamLine#threads(int)}. 461 | * 462 | * @return A sequential Stream. 463 | */ 464 | @Override 465 | public Stream sequential() { 466 | threads(1); 467 | return this; 468 | } 469 | 470 | /** 471 | * Returns a possibly parallel stream considering all operations may be performed in any order. 472 | * Intermediate operation 473 | * Sets {@link StreamLine#threads} to 2 if it was 1 before - see {@link StreamLine#threads(int)}. 474 | * 475 | * @return A possibly parallel Stream. 476 | */ 477 | @Override 478 | public Stream parallel() { 479 | return threads == 1 ? this.threads(2) : this; 480 | } 481 | 482 | /** 483 | * Sets stream processing to unordered, which can improve performance. See also {@link StreamLine#ordered(boolean)} 484 | * Intermediate operation 485 | * 486 | * @return An unordered Stream. 487 | */ 488 | @Override 489 | public Stream unordered() {return this.ordered(false);} 490 | 491 | /** 492 | * Returns the same stream with a close handler attached. 493 | * Intermediate operation 494 | * 495 | * @param closeHandler A Runnable that will be executed when the stream is closed. 496 | * @return The same Stream with a close handler attached. 497 | */ 498 | @Override 499 | public Stream onClose(final Runnable closeHandler) { 500 | this.closeHandler = closeHandler; 501 | return this; 502 | } 503 | 504 | /** 505 | * Closes the stream, causing all close handlers for this stream pipeline to be executed. 506 | * {@link StreamLine} does have nothing to clean up, so this method is a no-op. 507 | */ 508 | @Override 509 | public void close() { 510 | operations.clear(); 511 | if (closeHandler != null) { 512 | closeHandler.run(); 513 | } 514 | } 515 | 516 | /** 517 | * Returns whether this stream would execute tasks in parallel. True if the stream is parallel, otherwise false. 518 | * 519 | * @return True if threads != 1, otherwise false - see also {@link StreamLine#threads(int)} (). 520 | */ 521 | @Override 522 | public boolean isParallel() { 523 | return threads != 1; 524 | } 525 | 526 | /** 527 | * Performs an action for each element of this stream concurrently, without regard to the order of elements. 528 | * This method does not guarantee thread safety; users must ensure that the provided action is thread-safe. 529 | *

Terminal operation

. 530 | *
    531 | *
  • forEach(Consumer): Asynchronous, Concurrently, Unordered, No Thread Safety
  • 532 | *
  • {@link StreamLine#forEachSync(Consumer)}: Synchronous, Unordered, Thread Safe
  • 533 | *
  • {@link StreamLine#forEachOrdered(Consumer)}: Synchronous, Ordered, Thread Safe
  • 534 | *
535 | * 536 | * @param action A non-interfering action to perform on the elements of this stream. 537 | */ 538 | @Override 539 | public void forEach(final Consumer action) { 540 | forEachAsync(null, executeTerminal(false, false), pair -> action.accept(pair.getValue())); 541 | } 542 | 543 | /** 544 | * Performs an action for each element synchronously 545 | * It is required to take care of thread safety in the action. 546 | *

Terminal operation

. 547 | *
    548 | *
  • {forEachSync(Consumer): Synchronous, Unordered, Thread Safe
  • 549 | *
  • {@link StreamLine#forEach(Consumer)}: Asynchronous, Concurrently, Unordered, No Thread Safety
  • 550 | *
  • {@link StreamLine#forEachOrdered(Consumer)}: Synchronous, Ordered, Thread Safe
  • 551 | *
552 | * 553 | * @param action A non-interfering action to perform on the elements of this stream. 554 | */ 555 | public void forEachSync(final Consumer action) { 556 | for (final T item : executeTerminal()) { 557 | action.accept(item); 558 | } 559 | } 560 | 561 | /** 562 | * Performs a synchronous action for each element of this stream, preserving the encounter order of the stream. 563 | *

Terminal operation

. 564 | *
    565 | *
  • forEachOrdered(Consumer): Synchronous, Ordered, Thread Safe
  • 566 | *
  • {@link StreamLine#forEach(Consumer)}: Asynchronous, Concurrently, Unordered, No Thread Safety
  • 567 | *
  • {@link StreamLine#forEachSync(Consumer)}: Synchronous, Unordered, Thread Safe
  • 568 | *
569 | * 570 | * @param action A non-interfering action to perform on the elements of this stream. 571 | */ 572 | @Override 573 | public void forEachOrdered(final Consumer action) { 574 | for (final T item : executeTerminal(true, false)) { 575 | action.accept(item); 576 | } 577 | } 578 | 579 | /** 580 | * Returns an array containing the elements of this stream. 581 | * The order depends on {@link StreamLine#ordered(boolean)} 582 | *

Terminal operation

. 583 | * 584 | * @return An array containing the elements of this stream. 585 | */ 586 | @Override 587 | public Object[] toArray() { 588 | return executeTerminal(); 589 | } 590 | 591 | /** 592 | * Returns an array containing the elements of this stream, using the provided generator function to allocate the returned array. 593 | * The order depends on {@link StreamLine#ordered(boolean)} 594 | *

Terminal operation

. 595 | * 596 | * @param generator A function which produces a new array of the desired type and the provided length. 597 | * @return An array containing the elements of this stream. 598 | */ 599 | @Override 600 | public A[] toArray(final IntFunction generator) { 601 | return List.of(executeTerminal()).toArray(generator); 602 | } 603 | 604 | /** 605 | * Performs a reduction on the elements of this stream, using the provided identity value and an associative accumulation function, and returns the reduced value. 606 | *

Terminal operation

. 607 | * 608 | * @param identity The identity value for the accumulation function. 609 | * @param accumulator An associative, non-interfering, stateless function for combining two values. 610 | * @return The result of the reduction. 611 | */ 612 | @Override 613 | public T reduce(final T identity, final BinaryOperator accumulator) { 614 | T result = identity; 615 | for (final T item : executeTerminal()) { 616 | result = accumulator.apply(result, item); 617 | } 618 | return result; 619 | } 620 | 621 | /** 622 | * Performs a reduction on the elements of this stream using only a binary operator, starting from the first element as the initial value. 623 | * This variant of reduce does not take an identity value; thus, it returns an Optional to account for empty streams. 624 | * Terminal operation 625 | * 626 | * @param accumulator An associative, non-interfering, stateless function for combining two values. 627 | * @return An Optional describing the result of the reduction or an empty Optional if the stream is empty. 628 | */ 629 | @Override 630 | public Optional reduce(final BinaryOperator accumulator) { 631 | T result = null; 632 | for (final T item : executeTerminal()) { 633 | if (result == null) { 634 | result = item; // The first item is the initial value 635 | } else { 636 | result = accumulator.apply(result, item); // Apply the accumulator 637 | } 638 | } 639 | return Optional.ofNullable(result); 640 | } 641 | 642 | /** 643 | * Performs a reduction on the elements of this stream using an identity value, an accumulator, and a combiner function. 644 | * This method is intended for use where parallelism is involved, although this implementation does not specifically handle parallel execution. 645 | * Terminal operation 646 | * 647 | * @param identity The identity value for the accumulation function. 648 | * @param accumulator A function that takes two parameters: a partial result and the next element, and combines them. 649 | * @param combiner A function used to combine the partial results. This is mainly used in a parallel context. 650 | * @return The result of the reduction. 651 | */ 652 | @Override 653 | public U reduce(final U identity, final BiFunction accumulator, final BinaryOperator combiner) { 654 | U result = identity; 655 | for (final T item : executeTerminal()) { 656 | result = accumulator.apply(result, item); 657 | } 658 | return result; 659 | } 660 | 661 | @Override 662 | public R collect(final Supplier supplier, final BiConsumer accumulator, final BiConsumer combiner) { 663 | final R[] results = Arrays.stream(executeTerminal()).map(item -> { 664 | final R container = supplier.get(); 665 | accumulator.accept(container, item); 666 | return container; 667 | }).toArray(size -> (R[]) new Object[size]); 668 | final R resultContainer = supplier.get(); 669 | for (final R result : results) { 670 | combiner.accept(resultContainer, result); 671 | } 672 | return resultContainer; 673 | } 674 | 675 | /** 676 | * Performs a mutable reduction operation on the elements of this stream using a collector. 677 | * A Collector encapsulates the functions used as arguments to collect(), which can accommodate a wide range of reduction operations. 678 | * Terminal operation 679 | * 680 | * @param collector The collector encoding the reduction operation. 681 | * @return The result of the reduction. 682 | */ 683 | 684 | @Override 685 | public R collect(final Collector collector) { 686 | final A resultContainer = collector.supplier().get(); 687 | executeTerminal(); 688 | for (final T item : executeTerminal()) { 689 | collector.accumulator().accept(resultContainer, item); 690 | } 691 | return collector.finisher().apply(resultContainer); 692 | } 693 | 694 | @Override 695 | public Optional min(final Comparator comparator) { 696 | return reduce(BinaryOperator.minBy(comparator)); 697 | } 698 | 699 | @Override 700 | public Optional max(final Comparator comparator) { 701 | return reduce(BinaryOperator.maxBy(comparator)); 702 | } 703 | 704 | public double sum() { 705 | return Arrays.stream(executeTerminal()).filter(Number.class::isInstance).map(Number.class::cast).mapToDouble(Number::doubleValue).sum(); 706 | } 707 | 708 | public OptionalDouble max() { 709 | return Arrays.stream(executeTerminal()).filter(Number.class::isInstance).map(Number.class::cast).mapToDouble(Number::doubleValue).max(); 710 | } 711 | 712 | public OptionalDouble min() { 713 | return Arrays.stream(executeTerminal()).filter(Number.class::isInstance).map(Number.class::cast).mapToDouble(Number::doubleValue).min(); 714 | } 715 | 716 | public OptionalDouble average() { 717 | return Arrays.stream(executeTerminal()).filter(Number.class::isInstance).map(Number.class::cast).mapToDouble(Number::doubleValue).average(); 718 | } 719 | 720 | public DoubleSummaryStatistics statistics() { 721 | return Arrays.stream(executeTerminal()).filter(Number.class::isInstance).map(Number.class::cast).mapToDouble(Number::doubleValue).summaryStatistics(); 722 | } 723 | 724 | @Override 725 | public long count() { 726 | return executeTerminal().length; 727 | } 728 | 729 | /** 730 | * Determines whether any elements of this stream match the provided predicate. May not evaluate the predicate on all elements if not necessary for determining the result. 731 | * This is a short-circuiting terminal operation. 732 | * Terminal operation 733 | * 734 | * @param predicate A predicate to apply to elements to determine a match. 735 | * @return true if any elements of the stream match the provided predicate, otherwise false. 736 | */ 737 | @Override 738 | public boolean anyMatch(final Predicate predicate) { 739 | final AtomicBoolean result = new AtomicBoolean(false); 740 | final AtomicBoolean terminate = new AtomicBoolean(false); 741 | forEachAsync(terminate, executeTerminal(), item -> { 742 | if (item.getValue() != null && predicate.test((T) item.getValue()) && !result.getAndSet(true)) { 743 | terminate.set(true); 744 | } 745 | }); 746 | return result.get(); 747 | } 748 | 749 | /** 750 | * Determines whether all elements of this stream match the provided predicate. May not evaluate the predicate on all elements if not necessary for determining the result. 751 | * This is a short-circuiting terminal operation. 752 | * Terminal operation 753 | * 754 | * @param predicate A predicate to apply to elements to determine a match. 755 | * @return true if all elements of the stream match the provided predicate, otherwise false. 756 | */ 757 | @Override 758 | public boolean allMatch(final Predicate predicate) { 759 | final AtomicBoolean result = new AtomicBoolean(true); 760 | final AtomicBoolean terminate = new AtomicBoolean(false); 761 | forEachAsync(terminate, executeTerminal(), item -> { 762 | if (item.getValue() != null && !predicate.test((T) item.getValue()) && result.getAndSet(false)) { 763 | terminate.set(true); 764 | } 765 | }); 766 | return result.get(); 767 | } 768 | 769 | /** 770 | * Determines whether no elements of this stream match the provided predicate. May not evaluate the predicate on all elements if not necessary for determining the result. 771 | * This is a short-circuiting terminal operation. 772 | * Terminal operation 773 | * 774 | * @param predicate A predicate to apply to elements to determine a match. 775 | * @return true if no elements of the stream match the provided predicate, otherwise false. 776 | */ 777 | @Override 778 | public boolean noneMatch(final Predicate predicate) { 779 | return !anyMatch(predicate); 780 | } 781 | 782 | protected void forEachAsync(final AtomicBoolean terminate, final I[] values, final Consumer> runnable) { 783 | final Semaphore semaphore = threads > 0 ? new Semaphore(threads) : null; 784 | final List> futures = new ArrayList<>(); 785 | final AtomicInteger index = new AtomicInteger(0); 786 | for (final I item : values) { 787 | final int currentIndex = index.getAndIncrement(); 788 | try { 789 | if (terminate != null && terminate.get()) { 790 | break; 791 | } 792 | if (semaphore != null) { 793 | semaphore.acquire(); 794 | } 795 | futures.add(executor.submit(() -> { 796 | try { 797 | runnable.accept(new AbstractMap.SimpleImmutableEntry<>(currentIndex, item)); 798 | } finally { 799 | if (semaphore != null) { 800 | semaphore.release(); 801 | } 802 | } 803 | })); 804 | } catch (final InterruptedException ie) { 805 | Thread.currentThread().interrupt(); 806 | } 807 | } 808 | 809 | waitFor(futures); 810 | } 811 | 812 | protected T[] executeTerminal() { 813 | return executeTerminal(ordered, false); 814 | } 815 | 816 | protected T[] executeTerminal(final boolean ordered, final boolean findAny) { 817 | final Map indexedResults = new ConcurrentHashMap<>(); 818 | final AtomicBoolean terminate = new AtomicBoolean(false); 819 | 820 | forEachAsync(terminate, source, item -> { 821 | if (findAny && !indexedResults.isEmpty()) { 822 | terminate.set(true); 823 | } else { 824 | final Object result = applyOperations(item.getValue()); 825 | if (result != null) { 826 | indexedResults.put(item.getKey(), (T) result); 827 | } 828 | } 829 | }); 830 | 831 | // Collect results in the original order 832 | return ordered 833 | ? IntStream.range(0, source.length).mapToObj(indexedResults::get).filter(Objects::nonNull).toArray(size -> (T[]) new Object[size]) 834 | : indexedResults.values().toArray((T[]) new Object[0]); 835 | 836 | } 837 | 838 | @SuppressWarnings("java:S4276") // Suppress SonarLint warning about unchecked cast 839 | protected Object applyOperations(final Object item) { 840 | Object result = item; 841 | for (final Function operation : operations) { 842 | result = operation.apply(result); 843 | if (result == null) { 844 | break; 845 | } 846 | } 847 | return result; 848 | } 849 | 850 | public static void waitFor(final List> futures) { 851 | // Wait for all futures to complete 852 | for (final Future future : futures) { 853 | try { 854 | future.get(); 855 | } catch (final InterruptedException ie) { 856 | Thread.currentThread().interrupt(); 857 | } catch (final ExecutionException ee) { 858 | final Throwable cause = ee.getCause(); 859 | if (cause instanceof RuntimeException) { 860 | throw (RuntimeException) cause; 861 | } else { 862 | throw new IllegalStateException("Exception in thread execution", cause); 863 | } 864 | } 865 | } 866 | } 867 | } 868 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | indent_size = 4 5 | indent_style = space 6 | insert_final_newline = true 7 | max_line_length = 120 8 | tab_width = 4 9 | ij_continuation_indent_size = 4 10 | ij_formatter_off_tag = @formatter:off 11 | ij_formatter_on_tag = @formatter:on 12 | ij_formatter_tags_enabled = false 13 | ij_smart_tabs = false 14 | ij_visual_guides = none 15 | ij_wrap_on_typing = false 16 | 17 | [*.css] 18 | ij_css_align_closing_brace_with_properties = false 19 | ij_css_blank_lines_around_nested_selector = 1 20 | ij_css_blank_lines_between_blocks = 1 21 | ij_css_block_comment_add_space = false 22 | ij_css_brace_placement = end_of_line 23 | ij_css_enforce_quotes_on_format = false 24 | ij_css_hex_color_long_format = false 25 | ij_css_hex_color_lower_case = false 26 | ij_css_hex_color_short_format = false 27 | ij_css_hex_color_upper_case = false 28 | ij_css_keep_blank_lines_in_code = 2 29 | ij_css_keep_indents_on_empty_lines = false 30 | ij_css_keep_single_line_blocks = false 31 | ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow 32 | ij_css_space_after_colon = true 33 | ij_css_space_before_opening_brace = true 34 | ij_css_use_double_quotes = true 35 | ij_css_value_alignment = do_not_align 36 | 37 | [*.dart] 38 | max_line_length = 80 39 | 40 | [*.feature] 41 | indent_size = 2 42 | ij_gherkin_keep_indents_on_empty_lines = false 43 | 44 | [*.java] 45 | ij_java_align_consecutive_assignments = false 46 | ij_java_align_consecutive_variable_declarations = false 47 | ij_java_align_group_field_declarations = false 48 | ij_java_align_multiline_annotation_parameters = false 49 | ij_java_align_multiline_array_initializer_expression = false 50 | ij_java_align_multiline_assignment = false 51 | ij_java_align_multiline_binary_operation = false 52 | ij_java_align_multiline_chained_methods = false 53 | ij_java_align_multiline_extends_list = false 54 | ij_java_align_multiline_for = true 55 | ij_java_align_multiline_method_parentheses = false 56 | ij_java_align_multiline_parameters = true 57 | ij_java_align_multiline_parameters_in_calls = false 58 | ij_java_align_multiline_parenthesized_expression = false 59 | ij_java_align_multiline_records = true 60 | ij_java_align_multiline_resources = true 61 | ij_java_align_multiline_ternary_operation = false 62 | ij_java_align_multiline_text_blocks = false 63 | ij_java_align_multiline_throws_list = false 64 | ij_java_align_subsequent_simple_methods = false 65 | ij_java_align_throws_keyword = false 66 | ij_java_align_types_in_multi_catch = true 67 | ij_java_annotation_parameter_wrap = off 68 | ij_java_array_initializer_new_line_after_left_brace = false 69 | ij_java_array_initializer_right_brace_on_new_line = false 70 | ij_java_array_initializer_wrap = off 71 | ij_java_assert_statement_colon_on_next_line = false 72 | ij_java_assert_statement_wrap = off 73 | ij_java_assignment_wrap = off 74 | ij_java_binary_operation_sign_on_next_line = false 75 | ij_java_binary_operation_wrap = off 76 | ij_java_blank_lines_after_anonymous_class_header = 0 77 | ij_java_blank_lines_after_class_header = 0 78 | ij_java_blank_lines_after_imports = 1 79 | ij_java_blank_lines_after_package = 1 80 | ij_java_blank_lines_around_class = 1 81 | ij_java_blank_lines_around_field = 0 82 | ij_java_blank_lines_around_field_in_interface = 0 83 | ij_java_blank_lines_around_initializer = 1 84 | ij_java_blank_lines_around_method = 1 85 | ij_java_blank_lines_around_method_in_interface = 1 86 | ij_java_blank_lines_before_class_end = 0 87 | ij_java_blank_lines_before_imports = 1 88 | ij_java_blank_lines_before_method_body = 0 89 | ij_java_blank_lines_before_package = 0 90 | ij_java_block_brace_style = end_of_line 91 | ij_java_block_comment_add_space = false 92 | ij_java_block_comment_at_first_column = true 93 | ij_java_builder_methods = none 94 | ij_java_call_parameters_new_line_after_left_paren = false 95 | ij_java_call_parameters_right_paren_on_new_line = false 96 | ij_java_call_parameters_wrap = off 97 | ij_java_case_statement_on_separate_line = true 98 | ij_java_catch_on_new_line = false 99 | ij_java_class_annotation_wrap = split_into_lines 100 | ij_java_class_brace_style = end_of_line 101 | ij_java_class_count_to_use_import_on_demand = 5 102 | ij_java_class_names_in_javadoc = 1 103 | ij_java_do_not_indent_top_level_class_members = false 104 | ij_java_do_not_wrap_after_single_annotation = false 105 | ij_java_do_not_wrap_after_single_annotation_in_parameter = false 106 | ij_java_do_while_brace_force = never 107 | ij_java_doc_add_blank_line_after_description = true 108 | ij_java_doc_add_blank_line_after_param_comments = false 109 | ij_java_doc_add_blank_line_after_return = false 110 | ij_java_doc_add_p_tag_on_empty_lines = true 111 | ij_java_doc_align_exception_comments = true 112 | ij_java_doc_align_param_comments = true 113 | ij_java_doc_do_not_wrap_if_one_line = false 114 | ij_java_doc_enable_formatting = true 115 | ij_java_doc_enable_leading_asterisks = true 116 | ij_java_doc_indent_on_continuation = false 117 | ij_java_doc_keep_empty_lines = true 118 | ij_java_doc_keep_empty_parameter_tag = true 119 | ij_java_doc_keep_empty_return_tag = true 120 | ij_java_doc_keep_empty_throws_tag = true 121 | ij_java_doc_keep_invalid_tags = true 122 | ij_java_doc_param_description_on_new_line = false 123 | ij_java_doc_preserve_line_breaks = false 124 | ij_java_doc_use_throws_not_exception_tag = true 125 | ij_java_else_on_new_line = false 126 | ij_java_entity_dd_suffix = EJB 127 | ij_java_entity_eb_suffix = Bean 128 | ij_java_entity_hi_suffix = Home 129 | ij_java_entity_lhi_prefix = Local 130 | ij_java_entity_lhi_suffix = Home 131 | ij_java_entity_li_prefix = Local 132 | ij_java_entity_pk_class = java.lang.String 133 | ij_java_entity_vo_suffix = VO 134 | ij_java_enum_constants_wrap = off 135 | ij_java_extends_keyword_wrap = off 136 | ij_java_extends_list_wrap = off 137 | ij_java_field_annotation_wrap = split_into_lines 138 | ij_java_finally_on_new_line = false 139 | ij_java_for_brace_force = never 140 | ij_java_for_statement_new_line_after_left_paren = false 141 | ij_java_for_statement_right_paren_on_new_line = false 142 | ij_java_for_statement_wrap = off 143 | ij_java_generate_final_locals = false 144 | ij_java_generate_final_parameters = true 145 | ij_java_if_brace_force = never 146 | ij_java_imports_layout = *,|,javax.**,java.**,|,$* 147 | ij_java_indent_case_from_switch = true 148 | ij_java_insert_inner_class_imports = false 149 | ij_java_insert_override_annotation = true 150 | ij_java_keep_blank_lines_before_right_brace = 2 151 | ij_java_keep_blank_lines_between_package_declaration_and_header = 2 152 | ij_java_keep_blank_lines_in_code = 2 153 | ij_java_keep_blank_lines_in_declarations = 2 154 | ij_java_keep_builder_methods_indents = false 155 | ij_java_keep_control_statement_in_one_line = true 156 | ij_java_keep_first_column_comment = true 157 | ij_java_keep_indents_on_empty_lines = false 158 | ij_java_keep_line_breaks = true 159 | ij_java_keep_multiple_expressions_in_one_line = false 160 | ij_java_keep_simple_blocks_in_one_line = false 161 | ij_java_keep_simple_classes_in_one_line = false 162 | ij_java_keep_simple_lambdas_in_one_line = false 163 | ij_java_keep_simple_methods_in_one_line = false 164 | ij_java_label_indent_absolute = false 165 | ij_java_label_indent_size = 0 166 | ij_java_lambda_brace_style = end_of_line 167 | ij_java_layout_static_imports_separately = true 168 | ij_java_line_comment_add_space = false 169 | ij_java_line_comment_add_space_on_reformat = false 170 | ij_java_line_comment_at_first_column = true 171 | ij_java_message_dd_suffix = EJB 172 | ij_java_message_eb_suffix = Bean 173 | ij_java_method_annotation_wrap = split_into_lines 174 | ij_java_method_brace_style = end_of_line 175 | ij_java_method_call_chain_wrap = off 176 | ij_java_method_parameters_new_line_after_left_paren = false 177 | ij_java_method_parameters_right_paren_on_new_line = false 178 | ij_java_method_parameters_wrap = off 179 | ij_java_modifier_list_wrap = false 180 | ij_java_multi_catch_types_wrap = normal 181 | ij_java_names_count_to_use_import_on_demand = 3 182 | ij_java_new_line_after_lparen_in_annotation = false 183 | ij_java_new_line_after_lparen_in_record_header = false 184 | ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.* 185 | ij_java_parameter_annotation_wrap = off 186 | ij_java_parentheses_expression_new_line_after_left_paren = false 187 | ij_java_parentheses_expression_right_paren_on_new_line = false 188 | ij_java_place_assignment_sign_on_next_line = false 189 | ij_java_prefer_longer_names = true 190 | ij_java_prefer_parameters_wrap = false 191 | ij_java_record_components_wrap = normal 192 | ij_java_repeat_synchronized = true 193 | ij_java_replace_instanceof_and_cast = false 194 | ij_java_replace_null_check = true 195 | ij_java_replace_sum_lambda_with_method_ref = true 196 | ij_java_resource_list_new_line_after_left_paren = false 197 | ij_java_resource_list_right_paren_on_new_line = false 198 | ij_java_resource_list_wrap = off 199 | ij_java_rparen_on_new_line_in_annotation = false 200 | ij_java_rparen_on_new_line_in_record_header = false 201 | ij_java_session_dd_suffix = EJB 202 | ij_java_session_eb_suffix = Bean 203 | ij_java_session_hi_suffix = Home 204 | ij_java_session_lhi_prefix = Local 205 | ij_java_session_lhi_suffix = Home 206 | ij_java_session_li_prefix = Local 207 | ij_java_session_si_suffix = Service 208 | ij_java_space_after_closing_angle_bracket_in_type_argument = false 209 | ij_java_space_after_colon = true 210 | ij_java_space_after_comma = true 211 | ij_java_space_after_comma_in_type_arguments = true 212 | ij_java_space_after_for_semicolon = true 213 | ij_java_space_after_quest = true 214 | ij_java_space_after_type_cast = true 215 | ij_java_space_before_annotation_array_initializer_left_brace = false 216 | ij_java_space_before_annotation_parameter_list = false 217 | ij_java_space_before_array_initializer_left_brace = false 218 | ij_java_space_before_catch_keyword = true 219 | ij_java_space_before_catch_left_brace = true 220 | ij_java_space_before_catch_parentheses = true 221 | ij_java_space_before_class_left_brace = true 222 | ij_java_space_before_colon = true 223 | ij_java_space_before_colon_in_foreach = true 224 | ij_java_space_before_comma = false 225 | ij_java_space_before_do_left_brace = true 226 | ij_java_space_before_else_keyword = true 227 | ij_java_space_before_else_left_brace = true 228 | ij_java_space_before_finally_keyword = true 229 | ij_java_space_before_finally_left_brace = true 230 | ij_java_space_before_for_left_brace = true 231 | ij_java_space_before_for_parentheses = true 232 | ij_java_space_before_for_semicolon = false 233 | ij_java_space_before_if_left_brace = true 234 | ij_java_space_before_if_parentheses = true 235 | ij_java_space_before_method_call_parentheses = false 236 | ij_java_space_before_method_left_brace = true 237 | ij_java_space_before_method_parentheses = false 238 | ij_java_space_before_opening_angle_bracket_in_type_parameter = false 239 | ij_java_space_before_quest = true 240 | ij_java_space_before_switch_left_brace = true 241 | ij_java_space_before_switch_parentheses = true 242 | ij_java_space_before_synchronized_left_brace = true 243 | ij_java_space_before_synchronized_parentheses = true 244 | ij_java_space_before_try_left_brace = true 245 | ij_java_space_before_try_parentheses = true 246 | ij_java_space_before_type_parameter_list = false 247 | ij_java_space_before_while_keyword = true 248 | ij_java_space_before_while_left_brace = true 249 | ij_java_space_before_while_parentheses = true 250 | ij_java_space_inside_one_line_enum_braces = false 251 | ij_java_space_within_empty_array_initializer_braces = false 252 | ij_java_space_within_empty_method_call_parentheses = false 253 | ij_java_space_within_empty_method_parentheses = false 254 | ij_java_spaces_around_additive_operators = true 255 | ij_java_spaces_around_annotation_eq = true 256 | ij_java_spaces_around_assignment_operators = true 257 | ij_java_spaces_around_bitwise_operators = true 258 | ij_java_spaces_around_equality_operators = true 259 | ij_java_spaces_around_lambda_arrow = true 260 | ij_java_spaces_around_logical_operators = true 261 | ij_java_spaces_around_method_ref_dbl_colon = false 262 | ij_java_spaces_around_multiplicative_operators = true 263 | ij_java_spaces_around_relational_operators = true 264 | ij_java_spaces_around_shift_operators = true 265 | ij_java_spaces_around_type_bounds_in_type_parameters = true 266 | ij_java_spaces_around_unary_operator = false 267 | ij_java_spaces_within_angle_brackets = false 268 | ij_java_spaces_within_annotation_parentheses = false 269 | ij_java_spaces_within_array_initializer_braces = false 270 | ij_java_spaces_within_braces = false 271 | ij_java_spaces_within_brackets = false 272 | ij_java_spaces_within_cast_parentheses = false 273 | ij_java_spaces_within_catch_parentheses = false 274 | ij_java_spaces_within_for_parentheses = false 275 | ij_java_spaces_within_if_parentheses = false 276 | ij_java_spaces_within_method_call_parentheses = false 277 | ij_java_spaces_within_method_parentheses = false 278 | ij_java_spaces_within_parentheses = false 279 | ij_java_spaces_within_record_header = false 280 | ij_java_spaces_within_switch_parentheses = false 281 | ij_java_spaces_within_synchronized_parentheses = false 282 | ij_java_spaces_within_try_parentheses = false 283 | ij_java_spaces_within_while_parentheses = false 284 | ij_java_special_else_if_treatment = true 285 | ij_java_subclass_name_suffix = Impl 286 | ij_java_ternary_operation_signs_on_next_line = false 287 | ij_java_ternary_operation_wrap = off 288 | ij_java_test_name_suffix = Test 289 | ij_java_throws_keyword_wrap = off 290 | ij_java_throws_list_wrap = off 291 | ij_java_use_external_annotations = false 292 | ij_java_use_fq_class_names = false 293 | ij_java_use_relative_indents = false 294 | ij_java_use_single_class_imports = true 295 | ij_java_variable_annotation_wrap = off 296 | ij_java_visibility = public 297 | ij_java_while_brace_force = never 298 | ij_java_while_on_new_line = false 299 | ij_java_wrap_comments = false 300 | ij_java_wrap_first_method_in_call_chain = false 301 | ij_java_wrap_long_lines = false 302 | 303 | [*.less] 304 | indent_size = 2 305 | ij_less_align_closing_brace_with_properties = false 306 | ij_less_blank_lines_around_nested_selector = 1 307 | ij_less_blank_lines_between_blocks = 1 308 | ij_less_block_comment_add_space = false 309 | ij_less_brace_placement = 0 310 | ij_less_enforce_quotes_on_format = false 311 | ij_less_hex_color_long_format = false 312 | ij_less_hex_color_lower_case = false 313 | ij_less_hex_color_short_format = false 314 | ij_less_hex_color_upper_case = false 315 | ij_less_keep_blank_lines_in_code = 2 316 | ij_less_keep_indents_on_empty_lines = false 317 | ij_less_keep_single_line_blocks = false 318 | ij_less_line_comment_add_space = false 319 | ij_less_line_comment_at_first_column = false 320 | ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow 321 | ij_less_space_after_colon = true 322 | ij_less_space_before_opening_brace = true 323 | ij_less_use_double_quotes = true 324 | ij_less_value_alignment = 0 325 | 326 | [*.proto] 327 | indent_size = 2 328 | tab_width = 2 329 | ij_continuation_indent_size = 4 330 | ij_protobuf_keep_blank_lines_in_code = 2 331 | ij_protobuf_keep_indents_on_empty_lines = false 332 | ij_protobuf_keep_line_breaks = true 333 | ij_protobuf_space_after_comma = true 334 | ij_protobuf_space_before_comma = false 335 | ij_protobuf_spaces_around_assignment_operators = true 336 | ij_protobuf_spaces_within_braces = false 337 | ij_protobuf_spaces_within_brackets = false 338 | 339 | [*.sass] 340 | indent_size = 2 341 | ij_sass_align_closing_brace_with_properties = false 342 | ij_sass_blank_lines_around_nested_selector = 1 343 | ij_sass_blank_lines_between_blocks = 1 344 | ij_sass_brace_placement = 0 345 | ij_sass_enforce_quotes_on_format = false 346 | ij_sass_hex_color_long_format = false 347 | ij_sass_hex_color_lower_case = false 348 | ij_sass_hex_color_short_format = false 349 | ij_sass_hex_color_upper_case = false 350 | ij_sass_keep_blank_lines_in_code = 2 351 | ij_sass_keep_indents_on_empty_lines = false 352 | ij_sass_keep_single_line_blocks = false 353 | ij_sass_line_comment_add_space = false 354 | ij_sass_line_comment_at_first_column = false 355 | ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow 356 | ij_sass_space_after_colon = true 357 | ij_sass_space_before_opening_brace = true 358 | ij_sass_use_double_quotes = true 359 | ij_sass_value_alignment = 0 360 | 361 | [*.scss] 362 | indent_size = 2 363 | ij_scss_align_closing_brace_with_properties = false 364 | ij_scss_blank_lines_around_nested_selector = 1 365 | ij_scss_blank_lines_between_blocks = 1 366 | ij_scss_block_comment_add_space = false 367 | ij_scss_brace_placement = 0 368 | ij_scss_enforce_quotes_on_format = false 369 | ij_scss_hex_color_long_format = false 370 | ij_scss_hex_color_lower_case = false 371 | ij_scss_hex_color_short_format = false 372 | ij_scss_hex_color_upper_case = false 373 | ij_scss_keep_blank_lines_in_code = 2 374 | ij_scss_keep_indents_on_empty_lines = false 375 | ij_scss_keep_single_line_blocks = false 376 | ij_scss_line_comment_add_space = false 377 | ij_scss_line_comment_at_first_column = false 378 | ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow 379 | ij_scss_space_after_colon = true 380 | ij_scss_space_before_opening_brace = true 381 | ij_scss_use_double_quotes = true 382 | ij_scss_value_alignment = 0 383 | 384 | [*.styl] 385 | indent_size = 2 386 | ij_stylus_align_closing_brace_with_properties = false 387 | ij_stylus_blank_lines_around_nested_selector = 1 388 | ij_stylus_blank_lines_between_blocks = 1 389 | ij_stylus_brace_placement = 0 390 | ij_stylus_enforce_quotes_on_format = false 391 | ij_stylus_hex_color_long_format = false 392 | ij_stylus_hex_color_lower_case = false 393 | ij_stylus_hex_color_short_format = false 394 | ij_stylus_hex_color_upper_case = false 395 | ij_stylus_keep_blank_lines_in_code = 2 396 | ij_stylus_keep_indents_on_empty_lines = false 397 | ij_stylus_keep_single_line_blocks = false 398 | ij_stylus_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow 399 | ij_stylus_space_after_colon = true 400 | ij_stylus_space_before_opening_brace = true 401 | ij_stylus_use_double_quotes = true 402 | ij_stylus_value_alignment = 0 403 | 404 | [.editorconfig] 405 | ij_editorconfig_align_group_field_declarations = false 406 | ij_editorconfig_space_after_colon = false 407 | ij_editorconfig_space_after_comma = true 408 | ij_editorconfig_space_before_colon = false 409 | ij_editorconfig_space_before_comma = false 410 | ij_editorconfig_spaces_around_assignment_operators = true 411 | 412 | [{*.ad,*.adoc,*.asciidoc,.asciidoctorconfig}] 413 | ij_asciidoc_blank_lines_after_header = 1 414 | ij_asciidoc_blank_lines_keep_after_header = 1 415 | ij_asciidoc_formatting_enabled = true 416 | ij_asciidoc_one_sentence_per_line = true 417 | 418 | [{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.pom,*.qrc,*.rng,*.sdef,*.tld,*.wadl,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}] 419 | ij_xml_align_attributes = true 420 | ij_xml_align_text = false 421 | ij_xml_attribute_wrap = normal 422 | ij_xml_block_comment_add_space = false 423 | ij_xml_block_comment_at_first_column = true 424 | ij_xml_keep_blank_lines = 2 425 | ij_xml_keep_indents_on_empty_lines = false 426 | ij_xml_keep_line_breaks = true 427 | ij_xml_keep_line_breaks_in_text = true 428 | ij_xml_keep_whitespaces = false 429 | ij_xml_keep_whitespaces_around_cdata = preserve 430 | ij_xml_keep_whitespaces_inside_cdata = false 431 | ij_xml_line_comment_at_first_column = true 432 | ij_xml_space_after_tag_name = false 433 | ij_xml_space_around_equals_in_attribute = false 434 | ij_xml_space_inside_empty_tag = false 435 | ij_xml_text_wrap = normal 436 | ij_xml_use_custom_settings = false 437 | 438 | [{*.applescript,*.scpt}] 439 | indent_size = 2 440 | tab_width = 2 441 | ij_continuation_indent_size = 4 442 | ij_applescript_align_multiline_binary_operation = false 443 | ij_applescript_align_multiline_parameters = true 444 | ij_applescript_align_multiline_parameters_in_calls = false 445 | ij_applescript_binary_operation_sign_on_next_line = false 446 | ij_applescript_binary_operation_wrap = off 447 | ij_applescript_block_brace_style = end_of_line 448 | ij_applescript_call_parameters_new_line_after_left_paren = false 449 | ij_applescript_call_parameters_right_paren_on_new_line = false 450 | ij_applescript_call_parameters_wrap = off 451 | ij_applescript_else_on_new_line = false 452 | ij_applescript_keep_blank_lines_in_code = 2 453 | ij_applescript_keep_first_column_comment = true 454 | ij_applescript_keep_indents_on_empty_lines = false 455 | ij_applescript_keep_line_breaks = true 456 | ij_applescript_method_brace_style = end_of_line 457 | ij_applescript_method_parameters_new_line_after_left_paren = false 458 | ij_applescript_method_parameters_right_paren_on_new_line = false 459 | ij_applescript_method_parameters_wrap = off 460 | ij_applescript_parentheses_expression_new_line_after_left_paren = false 461 | ij_applescript_parentheses_expression_right_paren_on_new_line = false 462 | ij_applescript_space_after_colon = true 463 | ij_applescript_space_after_comma = true 464 | ij_applescript_space_after_comma_in_type_arguments = true 465 | ij_applescript_space_before_colon = true 466 | ij_applescript_space_before_comma = false 467 | ij_applescript_space_before_else_keyword = true 468 | ij_applescript_space_before_else_left_brace = true 469 | ij_applescript_space_before_if_parentheses = true 470 | ij_applescript_space_before_method_call_parentheses = false 471 | ij_applescript_space_before_method_left_brace = true 472 | ij_applescript_space_before_method_parentheses = false 473 | ij_applescript_space_before_while_keyword = true 474 | ij_applescript_spaces_around_additive_operators = true 475 | ij_applescript_spaces_around_assignment_operators = true 476 | ij_applescript_spaces_around_equality_operators = true 477 | ij_applescript_spaces_around_logical_operators = true 478 | ij_applescript_spaces_around_multiplicative_operators = true 479 | ij_applescript_spaces_around_relational_operators = true 480 | ij_applescript_spaces_around_shift_operators = true 481 | ij_applescript_spaces_around_unary_operator = false 482 | ij_applescript_spaces_within_if_parentheses = false 483 | ij_applescript_spaces_within_method_call_parentheses = false 484 | ij_applescript_spaces_within_method_parentheses = false 485 | ij_applescript_special_else_if_treatment = true 486 | 487 | [{*.ats,*.cts,*.mts,*.ts}] 488 | ij_continuation_indent_size = 4 489 | ij_typescript_align_imports = false 490 | ij_typescript_align_multiline_array_initializer_expression = false 491 | ij_typescript_align_multiline_binary_operation = false 492 | ij_typescript_align_multiline_chained_methods = false 493 | ij_typescript_align_multiline_extends_list = false 494 | ij_typescript_align_multiline_for = true 495 | ij_typescript_align_multiline_parameters = true 496 | ij_typescript_align_multiline_parameters_in_calls = false 497 | ij_typescript_align_multiline_ternary_operation = false 498 | ij_typescript_align_object_properties = 0 499 | ij_typescript_align_union_types = false 500 | ij_typescript_align_var_statements = 0 501 | ij_typescript_array_initializer_new_line_after_left_brace = false 502 | ij_typescript_array_initializer_right_brace_on_new_line = false 503 | ij_typescript_array_initializer_wrap = off 504 | ij_typescript_assignment_wrap = off 505 | ij_typescript_binary_operation_sign_on_next_line = false 506 | ij_typescript_binary_operation_wrap = off 507 | ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** 508 | ij_typescript_blank_lines_after_imports = 1 509 | ij_typescript_blank_lines_around_class = 1 510 | ij_typescript_blank_lines_around_field = 0 511 | ij_typescript_blank_lines_around_field_in_interface = 0 512 | ij_typescript_blank_lines_around_function = 1 513 | ij_typescript_blank_lines_around_method = 1 514 | ij_typescript_blank_lines_around_method_in_interface = 1 515 | ij_typescript_block_brace_style = end_of_line 516 | ij_typescript_block_comment_add_space = false 517 | ij_typescript_block_comment_at_first_column = true 518 | ij_typescript_call_parameters_new_line_after_left_paren = false 519 | ij_typescript_call_parameters_right_paren_on_new_line = false 520 | ij_typescript_call_parameters_wrap = off 521 | ij_typescript_catch_on_new_line = false 522 | ij_typescript_chained_call_dot_on_new_line = true 523 | ij_typescript_class_brace_style = end_of_line 524 | ij_typescript_comma_on_new_line = false 525 | ij_typescript_do_while_brace_force = never 526 | ij_typescript_else_on_new_line = false 527 | ij_typescript_enforce_trailing_comma = keep 528 | ij_typescript_enum_constants_wrap = on_every_item 529 | ij_typescript_extends_keyword_wrap = off 530 | ij_typescript_extends_list_wrap = off 531 | ij_typescript_field_prefix = _ 532 | ij_typescript_file_name_style = relaxed 533 | ij_typescript_finally_on_new_line = false 534 | ij_typescript_for_brace_force = never 535 | ij_typescript_for_statement_new_line_after_left_paren = false 536 | ij_typescript_for_statement_right_paren_on_new_line = false 537 | ij_typescript_for_statement_wrap = off 538 | ij_typescript_force_quote_style = false 539 | ij_typescript_force_semicolon_style = false 540 | ij_typescript_function_expression_brace_style = end_of_line 541 | ij_typescript_if_brace_force = never 542 | ij_typescript_import_merge_members = global 543 | ij_typescript_import_prefer_absolute_path = global 544 | ij_typescript_import_sort_members = true 545 | ij_typescript_import_sort_module_name = false 546 | ij_typescript_import_use_node_resolution = true 547 | ij_typescript_imports_wrap = on_every_item 548 | ij_typescript_indent_case_from_switch = true 549 | ij_typescript_indent_chained_calls = true 550 | ij_typescript_indent_package_children = 0 551 | ij_typescript_jsdoc_include_types = false 552 | ij_typescript_jsx_attribute_value = braces 553 | ij_typescript_keep_blank_lines_in_code = 2 554 | ij_typescript_keep_first_column_comment = true 555 | ij_typescript_keep_indents_on_empty_lines = false 556 | ij_typescript_keep_line_breaks = true 557 | ij_typescript_keep_simple_blocks_in_one_line = false 558 | ij_typescript_keep_simple_methods_in_one_line = false 559 | ij_typescript_line_comment_add_space = true 560 | ij_typescript_line_comment_at_first_column = false 561 | ij_typescript_method_brace_style = end_of_line 562 | ij_typescript_method_call_chain_wrap = off 563 | ij_typescript_method_parameters_new_line_after_left_paren = false 564 | ij_typescript_method_parameters_right_paren_on_new_line = false 565 | ij_typescript_method_parameters_wrap = off 566 | ij_typescript_object_literal_wrap = on_every_item 567 | ij_typescript_parentheses_expression_new_line_after_left_paren = false 568 | ij_typescript_parentheses_expression_right_paren_on_new_line = false 569 | ij_typescript_place_assignment_sign_on_next_line = false 570 | ij_typescript_prefer_as_type_cast = false 571 | ij_typescript_prefer_explicit_types_function_expression_returns = false 572 | ij_typescript_prefer_explicit_types_function_returns = false 573 | ij_typescript_prefer_explicit_types_vars_fields = false 574 | ij_typescript_prefer_parameters_wrap = false 575 | ij_typescript_reformat_c_style_comments = false 576 | ij_typescript_space_after_colon = true 577 | ij_typescript_space_after_comma = true 578 | ij_typescript_space_after_dots_in_rest_parameter = false 579 | ij_typescript_space_after_generator_mult = true 580 | ij_typescript_space_after_property_colon = true 581 | ij_typescript_space_after_quest = true 582 | ij_typescript_space_after_type_colon = true 583 | ij_typescript_space_after_unary_not = false 584 | ij_typescript_space_before_async_arrow_lparen = true 585 | ij_typescript_space_before_catch_keyword = true 586 | ij_typescript_space_before_catch_left_brace = true 587 | ij_typescript_space_before_catch_parentheses = true 588 | ij_typescript_space_before_class_lbrace = true 589 | ij_typescript_space_before_class_left_brace = true 590 | ij_typescript_space_before_colon = true 591 | ij_typescript_space_before_comma = false 592 | ij_typescript_space_before_do_left_brace = true 593 | ij_typescript_space_before_else_keyword = true 594 | ij_typescript_space_before_else_left_brace = true 595 | ij_typescript_space_before_finally_keyword = true 596 | ij_typescript_space_before_finally_left_brace = true 597 | ij_typescript_space_before_for_left_brace = true 598 | ij_typescript_space_before_for_parentheses = true 599 | ij_typescript_space_before_for_semicolon = false 600 | ij_typescript_space_before_function_left_parenth = true 601 | ij_typescript_space_before_generator_mult = false 602 | ij_typescript_space_before_if_left_brace = true 603 | ij_typescript_space_before_if_parentheses = true 604 | ij_typescript_space_before_method_call_parentheses = false 605 | ij_typescript_space_before_method_left_brace = true 606 | ij_typescript_space_before_method_parentheses = false 607 | ij_typescript_space_before_property_colon = false 608 | ij_typescript_space_before_quest = true 609 | ij_typescript_space_before_switch_left_brace = true 610 | ij_typescript_space_before_switch_parentheses = true 611 | ij_typescript_space_before_try_left_brace = true 612 | ij_typescript_space_before_type_colon = false 613 | ij_typescript_space_before_unary_not = false 614 | ij_typescript_space_before_while_keyword = true 615 | ij_typescript_space_before_while_left_brace = true 616 | ij_typescript_space_before_while_parentheses = true 617 | ij_typescript_spaces_around_additive_operators = true 618 | ij_typescript_spaces_around_arrow_function_operator = true 619 | ij_typescript_spaces_around_assignment_operators = true 620 | ij_typescript_spaces_around_bitwise_operators = true 621 | ij_typescript_spaces_around_equality_operators = true 622 | ij_typescript_spaces_around_logical_operators = true 623 | ij_typescript_spaces_around_multiplicative_operators = true 624 | ij_typescript_spaces_around_relational_operators = true 625 | ij_typescript_spaces_around_shift_operators = true 626 | ij_typescript_spaces_around_unary_operator = false 627 | ij_typescript_spaces_within_array_initializer_brackets = false 628 | ij_typescript_spaces_within_brackets = false 629 | ij_typescript_spaces_within_catch_parentheses = false 630 | ij_typescript_spaces_within_for_parentheses = false 631 | ij_typescript_spaces_within_if_parentheses = false 632 | ij_typescript_spaces_within_imports = false 633 | ij_typescript_spaces_within_interpolation_expressions = false 634 | ij_typescript_spaces_within_method_call_parentheses = false 635 | ij_typescript_spaces_within_method_parentheses = false 636 | ij_typescript_spaces_within_object_literal_braces = false 637 | ij_typescript_spaces_within_object_type_braces = true 638 | ij_typescript_spaces_within_parentheses = false 639 | ij_typescript_spaces_within_switch_parentheses = false 640 | ij_typescript_spaces_within_type_assertion = false 641 | ij_typescript_spaces_within_union_types = true 642 | ij_typescript_spaces_within_while_parentheses = false 643 | ij_typescript_special_else_if_treatment = true 644 | ij_typescript_ternary_operation_signs_on_next_line = false 645 | ij_typescript_ternary_operation_wrap = off 646 | ij_typescript_union_types_wrap = on_every_item 647 | ij_typescript_use_chained_calls_group_indents = false 648 | ij_typescript_use_double_quotes = true 649 | ij_typescript_use_explicit_js_extension = auto 650 | ij_typescript_use_path_mapping = always 651 | ij_typescript_use_public_modifier = false 652 | ij_typescript_use_semicolon_after_statement = true 653 | ij_typescript_var_declaration_wrap = normal 654 | ij_typescript_while_brace_force = never 655 | ij_typescript_while_on_new_line = false 656 | ij_typescript_wrap_comments = false 657 | 658 | [{*.bash,*.sh,*.zsh}] 659 | indent_size = 2 660 | tab_width = 2 661 | ij_shell_binary_ops_start_line = false 662 | ij_shell_keep_column_alignment_padding = false 663 | ij_shell_minify_program = false 664 | ij_shell_redirect_followed_by_space = false 665 | ij_shell_switch_cases_indented = false 666 | ij_shell_use_unix_line_separator = true 667 | 668 | [{*.cjs,*.js}] 669 | ij_continuation_indent_size = 4 670 | ij_javascript_align_imports = false 671 | ij_javascript_align_multiline_array_initializer_expression = false 672 | ij_javascript_align_multiline_binary_operation = false 673 | ij_javascript_align_multiline_chained_methods = false 674 | ij_javascript_align_multiline_extends_list = false 675 | ij_javascript_align_multiline_for = true 676 | ij_javascript_align_multiline_parameters = true 677 | ij_javascript_align_multiline_parameters_in_calls = false 678 | ij_javascript_align_multiline_ternary_operation = false 679 | ij_javascript_align_object_properties = 0 680 | ij_javascript_align_union_types = false 681 | ij_javascript_align_var_statements = 0 682 | ij_javascript_array_initializer_new_line_after_left_brace = false 683 | ij_javascript_array_initializer_right_brace_on_new_line = false 684 | ij_javascript_array_initializer_wrap = off 685 | ij_javascript_assignment_wrap = off 686 | ij_javascript_binary_operation_sign_on_next_line = false 687 | ij_javascript_binary_operation_wrap = off 688 | ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** 689 | ij_javascript_blank_lines_after_imports = 1 690 | ij_javascript_blank_lines_around_class = 1 691 | ij_javascript_blank_lines_around_field = 0 692 | ij_javascript_blank_lines_around_function = 1 693 | ij_javascript_blank_lines_around_method = 1 694 | ij_javascript_block_brace_style = end_of_line 695 | ij_javascript_block_comment_add_space = false 696 | ij_javascript_block_comment_at_first_column = true 697 | ij_javascript_call_parameters_new_line_after_left_paren = false 698 | ij_javascript_call_parameters_right_paren_on_new_line = false 699 | ij_javascript_call_parameters_wrap = off 700 | ij_javascript_catch_on_new_line = false 701 | ij_javascript_chained_call_dot_on_new_line = true 702 | ij_javascript_class_brace_style = end_of_line 703 | ij_javascript_comma_on_new_line = false 704 | ij_javascript_do_while_brace_force = never 705 | ij_javascript_else_on_new_line = false 706 | ij_javascript_enforce_trailing_comma = keep 707 | ij_javascript_extends_keyword_wrap = off 708 | ij_javascript_extends_list_wrap = off 709 | ij_javascript_field_prefix = _ 710 | ij_javascript_file_name_style = relaxed 711 | ij_javascript_finally_on_new_line = false 712 | ij_javascript_for_brace_force = never 713 | ij_javascript_for_statement_new_line_after_left_paren = false 714 | ij_javascript_for_statement_right_paren_on_new_line = false 715 | ij_javascript_for_statement_wrap = off 716 | ij_javascript_force_quote_style = false 717 | ij_javascript_force_semicolon_style = false 718 | ij_javascript_function_expression_brace_style = end_of_line 719 | ij_javascript_if_brace_force = never 720 | ij_javascript_import_merge_members = global 721 | ij_javascript_import_prefer_absolute_path = global 722 | ij_javascript_import_sort_members = true 723 | ij_javascript_import_sort_module_name = false 724 | ij_javascript_import_use_node_resolution = true 725 | ij_javascript_imports_wrap = on_every_item 726 | ij_javascript_indent_case_from_switch = true 727 | ij_javascript_indent_chained_calls = true 728 | ij_javascript_indent_package_children = 0 729 | ij_javascript_jsx_attribute_value = braces 730 | ij_javascript_keep_blank_lines_in_code = 2 731 | ij_javascript_keep_first_column_comment = true 732 | ij_javascript_keep_indents_on_empty_lines = false 733 | ij_javascript_keep_line_breaks = true 734 | ij_javascript_keep_simple_blocks_in_one_line = false 735 | ij_javascript_keep_simple_methods_in_one_line = false 736 | ij_javascript_line_comment_add_space = true 737 | ij_javascript_line_comment_at_first_column = false 738 | ij_javascript_method_brace_style = end_of_line 739 | ij_javascript_method_call_chain_wrap = off 740 | ij_javascript_method_parameters_new_line_after_left_paren = false 741 | ij_javascript_method_parameters_right_paren_on_new_line = false 742 | ij_javascript_method_parameters_wrap = off 743 | ij_javascript_object_literal_wrap = on_every_item 744 | ij_javascript_parentheses_expression_new_line_after_left_paren = false 745 | ij_javascript_parentheses_expression_right_paren_on_new_line = false 746 | ij_javascript_place_assignment_sign_on_next_line = false 747 | ij_javascript_prefer_as_type_cast = false 748 | ij_javascript_prefer_explicit_types_function_expression_returns = false 749 | ij_javascript_prefer_explicit_types_function_returns = false 750 | ij_javascript_prefer_explicit_types_vars_fields = false 751 | ij_javascript_prefer_parameters_wrap = false 752 | ij_javascript_reformat_c_style_comments = false 753 | ij_javascript_space_after_colon = true 754 | ij_javascript_space_after_comma = true 755 | ij_javascript_space_after_dots_in_rest_parameter = false 756 | ij_javascript_space_after_generator_mult = true 757 | ij_javascript_space_after_property_colon = true 758 | ij_javascript_space_after_quest = true 759 | ij_javascript_space_after_type_colon = true 760 | ij_javascript_space_after_unary_not = false 761 | ij_javascript_space_before_async_arrow_lparen = true 762 | ij_javascript_space_before_catch_keyword = true 763 | ij_javascript_space_before_catch_left_brace = true 764 | ij_javascript_space_before_catch_parentheses = true 765 | ij_javascript_space_before_class_lbrace = true 766 | ij_javascript_space_before_class_left_brace = true 767 | ij_javascript_space_before_colon = true 768 | ij_javascript_space_before_comma = false 769 | ij_javascript_space_before_do_left_brace = true 770 | ij_javascript_space_before_else_keyword = true 771 | ij_javascript_space_before_else_left_brace = true 772 | ij_javascript_space_before_finally_keyword = true 773 | ij_javascript_space_before_finally_left_brace = true 774 | ij_javascript_space_before_for_left_brace = true 775 | ij_javascript_space_before_for_parentheses = true 776 | ij_javascript_space_before_for_semicolon = false 777 | ij_javascript_space_before_function_left_parenth = true 778 | ij_javascript_space_before_generator_mult = false 779 | ij_javascript_space_before_if_left_brace = true 780 | ij_javascript_space_before_if_parentheses = true 781 | ij_javascript_space_before_method_call_parentheses = false 782 | ij_javascript_space_before_method_left_brace = true 783 | ij_javascript_space_before_method_parentheses = false 784 | ij_javascript_space_before_property_colon = false 785 | ij_javascript_space_before_quest = true 786 | ij_javascript_space_before_switch_left_brace = true 787 | ij_javascript_space_before_switch_parentheses = true 788 | ij_javascript_space_before_try_left_brace = true 789 | ij_javascript_space_before_type_colon = false 790 | ij_javascript_space_before_unary_not = false 791 | ij_javascript_space_before_while_keyword = true 792 | ij_javascript_space_before_while_left_brace = true 793 | ij_javascript_space_before_while_parentheses = true 794 | ij_javascript_spaces_around_additive_operators = true 795 | ij_javascript_spaces_around_arrow_function_operator = true 796 | ij_javascript_spaces_around_assignment_operators = true 797 | ij_javascript_spaces_around_bitwise_operators = true 798 | ij_javascript_spaces_around_equality_operators = true 799 | ij_javascript_spaces_around_logical_operators = true 800 | ij_javascript_spaces_around_multiplicative_operators = true 801 | ij_javascript_spaces_around_relational_operators = true 802 | ij_javascript_spaces_around_shift_operators = true 803 | ij_javascript_spaces_around_unary_operator = false 804 | ij_javascript_spaces_within_array_initializer_brackets = false 805 | ij_javascript_spaces_within_brackets = false 806 | ij_javascript_spaces_within_catch_parentheses = false 807 | ij_javascript_spaces_within_for_parentheses = false 808 | ij_javascript_spaces_within_if_parentheses = false 809 | ij_javascript_spaces_within_imports = false 810 | ij_javascript_spaces_within_interpolation_expressions = false 811 | ij_javascript_spaces_within_method_call_parentheses = false 812 | ij_javascript_spaces_within_method_parentheses = false 813 | ij_javascript_spaces_within_object_literal_braces = false 814 | ij_javascript_spaces_within_object_type_braces = true 815 | ij_javascript_spaces_within_parentheses = false 816 | ij_javascript_spaces_within_switch_parentheses = false 817 | ij_javascript_spaces_within_type_assertion = false 818 | ij_javascript_spaces_within_union_types = true 819 | ij_javascript_spaces_within_while_parentheses = false 820 | ij_javascript_special_else_if_treatment = true 821 | ij_javascript_ternary_operation_signs_on_next_line = false 822 | ij_javascript_ternary_operation_wrap = off 823 | ij_javascript_union_types_wrap = on_every_item 824 | ij_javascript_use_chained_calls_group_indents = false 825 | ij_javascript_use_double_quotes = true 826 | ij_javascript_use_explicit_js_extension = auto 827 | ij_javascript_use_path_mapping = always 828 | ij_javascript_use_public_modifier = false 829 | ij_javascript_use_semicolon_after_statement = true 830 | ij_javascript_var_declaration_wrap = normal 831 | ij_javascript_while_brace_force = never 832 | ij_javascript_while_on_new_line = false 833 | ij_javascript_wrap_comments = false 834 | 835 | [{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}] 836 | ij_continuation_indent_size = 4 837 | ij_php_align_assignments = false 838 | ij_php_align_class_constants = false 839 | ij_php_align_group_field_declarations = false 840 | ij_php_align_inline_comments = false 841 | ij_php_align_key_value_pairs = false 842 | ij_php_align_match_arm_bodies = false 843 | ij_php_align_multiline_array_initializer_expression = false 844 | ij_php_align_multiline_binary_operation = false 845 | ij_php_align_multiline_chained_methods = false 846 | ij_php_align_multiline_extends_list = false 847 | ij_php_align_multiline_for = true 848 | ij_php_align_multiline_parameters = true 849 | ij_php_align_multiline_parameters_in_calls = false 850 | ij_php_align_multiline_ternary_operation = false 851 | ij_php_align_named_arguments = false 852 | ij_php_align_phpdoc_comments = false 853 | ij_php_align_phpdoc_param_names = false 854 | ij_php_anonymous_brace_style = end_of_line 855 | ij_php_api_weight = 28 856 | ij_php_array_initializer_new_line_after_left_brace = false 857 | ij_php_array_initializer_right_brace_on_new_line = false 858 | ij_php_array_initializer_wrap = off 859 | ij_php_assignment_wrap = off 860 | ij_php_attributes_wrap = off 861 | ij_php_author_weight = 28 862 | ij_php_binary_operation_sign_on_next_line = false 863 | ij_php_binary_operation_wrap = off 864 | ij_php_blank_lines_after_class_header = 0 865 | ij_php_blank_lines_after_function = 1 866 | ij_php_blank_lines_after_imports = 1 867 | ij_php_blank_lines_after_opening_tag = 0 868 | ij_php_blank_lines_after_package = 0 869 | ij_php_blank_lines_around_class = 1 870 | ij_php_blank_lines_around_constants = 0 871 | ij_php_blank_lines_around_field = 0 872 | ij_php_blank_lines_around_method = 1 873 | ij_php_blank_lines_before_class_end = 0 874 | ij_php_blank_lines_before_imports = 1 875 | ij_php_blank_lines_before_method_body = 0 876 | ij_php_blank_lines_before_package = 1 877 | ij_php_blank_lines_before_return_statement = 0 878 | ij_php_blank_lines_between_imports = 0 879 | ij_php_block_brace_style = end_of_line 880 | ij_php_call_parameters_new_line_after_left_paren = false 881 | ij_php_call_parameters_right_paren_on_new_line = false 882 | ij_php_call_parameters_wrap = off 883 | ij_php_catch_on_new_line = false 884 | ij_php_category_weight = 28 885 | ij_php_class_brace_style = next_line 886 | ij_php_comma_after_last_argument = false 887 | ij_php_comma_after_last_array_element = false 888 | ij_php_comma_after_last_closure_use_var = false 889 | ij_php_comma_after_last_parameter = false 890 | ij_php_concat_spaces = true 891 | ij_php_copyright_weight = 28 892 | ij_php_deprecated_weight = 28 893 | ij_php_do_while_brace_force = never 894 | ij_php_else_if_style = as_is 895 | ij_php_else_on_new_line = false 896 | ij_php_example_weight = 28 897 | ij_php_extends_keyword_wrap = off 898 | ij_php_extends_list_wrap = off 899 | ij_php_fields_default_visibility = private 900 | ij_php_filesource_weight = 28 901 | ij_php_finally_on_new_line = false 902 | ij_php_for_brace_force = never 903 | ij_php_for_statement_new_line_after_left_paren = false 904 | ij_php_for_statement_right_paren_on_new_line = false 905 | ij_php_for_statement_wrap = off 906 | ij_php_force_empty_methods_in_one_line = false 907 | ij_php_force_short_declaration_array_style = false 908 | ij_php_getters_setters_naming_style = camel_case 909 | ij_php_getters_setters_order_style = getters_first 910 | ij_php_global_weight = 28 911 | ij_php_group_use_wrap = on_every_item 912 | ij_php_if_brace_force = never 913 | ij_php_if_lparen_on_next_line = false 914 | ij_php_if_rparen_on_next_line = false 915 | ij_php_ignore_weight = 28 916 | ij_php_import_sorting = alphabetic 917 | ij_php_indent_break_from_case = true 918 | ij_php_indent_case_from_switch = true 919 | ij_php_indent_code_in_php_tags = false 920 | ij_php_internal_weight = 28 921 | ij_php_keep_blank_lines_after_lbrace = 2 922 | ij_php_keep_blank_lines_before_right_brace = 2 923 | ij_php_keep_blank_lines_in_code = 2 924 | ij_php_keep_blank_lines_in_declarations = 2 925 | ij_php_keep_control_statement_in_one_line = true 926 | ij_php_keep_first_column_comment = true 927 | ij_php_keep_indents_on_empty_lines = false 928 | ij_php_keep_line_breaks = true 929 | ij_php_keep_rparen_and_lbrace_on_one_line = false 930 | ij_php_keep_simple_classes_in_one_line = false 931 | ij_php_keep_simple_methods_in_one_line = false 932 | ij_php_lambda_brace_style = end_of_line 933 | ij_php_license_weight = 28 934 | ij_php_line_comment_add_space = false 935 | ij_php_line_comment_at_first_column = true 936 | ij_php_link_weight = 28 937 | ij_php_lower_case_boolean_const = false 938 | ij_php_lower_case_keywords = true 939 | ij_php_lower_case_null_const = false 940 | ij_php_method_brace_style = next_line 941 | ij_php_method_call_chain_wrap = off 942 | ij_php_method_parameters_new_line_after_left_paren = false 943 | ij_php_method_parameters_right_paren_on_new_line = false 944 | ij_php_method_parameters_wrap = off 945 | ij_php_method_weight = 28 946 | ij_php_modifier_list_wrap = false 947 | ij_php_multiline_chained_calls_semicolon_on_new_line = false 948 | ij_php_namespace_brace_style = 1 949 | ij_php_new_line_after_php_opening_tag = false 950 | ij_php_null_type_position = in_the_end 951 | ij_php_package_weight = 28 952 | ij_php_param_weight = 0 953 | ij_php_parameters_attributes_wrap = off 954 | ij_php_parentheses_expression_new_line_after_left_paren = false 955 | ij_php_parentheses_expression_right_paren_on_new_line = false 956 | ij_php_phpdoc_blank_line_before_tags = false 957 | ij_php_phpdoc_blank_lines_around_parameters = false 958 | ij_php_phpdoc_keep_blank_lines = true 959 | ij_php_phpdoc_param_spaces_between_name_and_description = 1 960 | ij_php_phpdoc_param_spaces_between_tag_and_type = 1 961 | ij_php_phpdoc_param_spaces_between_type_and_name = 1 962 | ij_php_phpdoc_use_fqcn = false 963 | ij_php_phpdoc_wrap_long_lines = false 964 | ij_php_place_assignment_sign_on_next_line = false 965 | ij_php_place_parens_for_constructor = 0 966 | ij_php_property_read_weight = 28 967 | ij_php_property_weight = 28 968 | ij_php_property_write_weight = 28 969 | ij_php_return_type_on_new_line = false 970 | ij_php_return_weight = 1 971 | ij_php_see_weight = 28 972 | ij_php_since_weight = 28 973 | ij_php_sort_phpdoc_elements = true 974 | ij_php_space_after_colon = true 975 | ij_php_space_after_colon_in_enum_backed_type = true 976 | ij_php_space_after_colon_in_named_argument = true 977 | ij_php_space_after_colon_in_return_type = true 978 | ij_php_space_after_comma = true 979 | ij_php_space_after_for_semicolon = true 980 | ij_php_space_after_quest = true 981 | ij_php_space_after_type_cast = false 982 | ij_php_space_after_unary_not = false 983 | ij_php_space_before_array_initializer_left_brace = false 984 | ij_php_space_before_catch_keyword = true 985 | ij_php_space_before_catch_left_brace = true 986 | ij_php_space_before_catch_parentheses = true 987 | ij_php_space_before_class_left_brace = true 988 | ij_php_space_before_closure_left_parenthesis = true 989 | ij_php_space_before_colon = true 990 | ij_php_space_before_colon_in_enum_backed_type = false 991 | ij_php_space_before_colon_in_named_argument = false 992 | ij_php_space_before_colon_in_return_type = false 993 | ij_php_space_before_comma = false 994 | ij_php_space_before_do_left_brace = true 995 | ij_php_space_before_else_keyword = true 996 | ij_php_space_before_else_left_brace = true 997 | ij_php_space_before_finally_keyword = true 998 | ij_php_space_before_finally_left_brace = true 999 | ij_php_space_before_for_left_brace = true 1000 | ij_php_space_before_for_parentheses = true 1001 | ij_php_space_before_for_semicolon = false 1002 | ij_php_space_before_if_left_brace = true 1003 | ij_php_space_before_if_parentheses = true 1004 | ij_php_space_before_method_call_parentheses = false 1005 | ij_php_space_before_method_left_brace = true 1006 | ij_php_space_before_method_parentheses = false 1007 | ij_php_space_before_quest = true 1008 | ij_php_space_before_short_closure_left_parenthesis = false 1009 | ij_php_space_before_switch_left_brace = true 1010 | ij_php_space_before_switch_parentheses = true 1011 | ij_php_space_before_try_left_brace = true 1012 | ij_php_space_before_unary_not = false 1013 | ij_php_space_before_while_keyword = true 1014 | ij_php_space_before_while_left_brace = true 1015 | ij_php_space_before_while_parentheses = true 1016 | ij_php_space_between_ternary_quest_and_colon = false 1017 | ij_php_spaces_around_additive_operators = true 1018 | ij_php_spaces_around_arrow = false 1019 | ij_php_spaces_around_assignment_in_declare = false 1020 | ij_php_spaces_around_assignment_operators = true 1021 | ij_php_spaces_around_bitwise_operators = true 1022 | ij_php_spaces_around_equality_operators = true 1023 | ij_php_spaces_around_logical_operators = true 1024 | ij_php_spaces_around_multiplicative_operators = true 1025 | ij_php_spaces_around_null_coalesce_operator = true 1026 | ij_php_spaces_around_pipe_in_union_type = false 1027 | ij_php_spaces_around_relational_operators = true 1028 | ij_php_spaces_around_shift_operators = true 1029 | ij_php_spaces_around_unary_operator = false 1030 | ij_php_spaces_around_var_within_brackets = false 1031 | ij_php_spaces_within_array_initializer_braces = false 1032 | ij_php_spaces_within_brackets = false 1033 | ij_php_spaces_within_catch_parentheses = false 1034 | ij_php_spaces_within_for_parentheses = false 1035 | ij_php_spaces_within_if_parentheses = false 1036 | ij_php_spaces_within_method_call_parentheses = false 1037 | ij_php_spaces_within_method_parentheses = false 1038 | ij_php_spaces_within_parentheses = false 1039 | ij_php_spaces_within_short_echo_tags = true 1040 | ij_php_spaces_within_switch_parentheses = false 1041 | ij_php_spaces_within_while_parentheses = false 1042 | ij_php_special_else_if_treatment = false 1043 | ij_php_subpackage_weight = 28 1044 | ij_php_ternary_operation_signs_on_next_line = false 1045 | ij_php_ternary_operation_wrap = off 1046 | ij_php_throws_weight = 2 1047 | ij_php_todo_weight = 28 1048 | ij_php_treat_multiline_arrays_and_lambdas_multiline = false 1049 | ij_php_unknown_tag_weight = 28 1050 | ij_php_upper_case_boolean_const = false 1051 | ij_php_upper_case_null_const = false 1052 | ij_php_uses_weight = 28 1053 | ij_php_var_weight = 28 1054 | ij_php_variable_naming_style = mixed 1055 | ij_php_version_weight = 28 1056 | ij_php_while_brace_force = never 1057 | ij_php_while_on_new_line = false 1058 | 1059 | [{*.gant,*.groovy,*.gy}] 1060 | ij_groovy_align_group_field_declarations = false 1061 | ij_groovy_align_multiline_array_initializer_expression = false 1062 | ij_groovy_align_multiline_assignment = false 1063 | ij_groovy_align_multiline_binary_operation = false 1064 | ij_groovy_align_multiline_chained_methods = false 1065 | ij_groovy_align_multiline_extends_list = false 1066 | ij_groovy_align_multiline_for = true 1067 | ij_groovy_align_multiline_list_or_map = true 1068 | ij_groovy_align_multiline_method_parentheses = false 1069 | ij_groovy_align_multiline_parameters = true 1070 | ij_groovy_align_multiline_parameters_in_calls = false 1071 | ij_groovy_align_multiline_resources = true 1072 | ij_groovy_align_multiline_ternary_operation = false 1073 | ij_groovy_align_multiline_throws_list = false 1074 | ij_groovy_align_named_args_in_map = true 1075 | ij_groovy_align_throws_keyword = false 1076 | ij_groovy_array_initializer_new_line_after_left_brace = false 1077 | ij_groovy_array_initializer_right_brace_on_new_line = false 1078 | ij_groovy_array_initializer_wrap = off 1079 | ij_groovy_assert_statement_wrap = off 1080 | ij_groovy_assignment_wrap = off 1081 | ij_groovy_binary_operation_wrap = off 1082 | ij_groovy_blank_lines_after_class_header = 0 1083 | ij_groovy_blank_lines_after_imports = 1 1084 | ij_groovy_blank_lines_after_package = 1 1085 | ij_groovy_blank_lines_around_class = 1 1086 | ij_groovy_blank_lines_around_field = 0 1087 | ij_groovy_blank_lines_around_field_in_interface = 0 1088 | ij_groovy_blank_lines_around_method = 1 1089 | ij_groovy_blank_lines_around_method_in_interface = 1 1090 | ij_groovy_blank_lines_before_imports = 1 1091 | ij_groovy_blank_lines_before_method_body = 0 1092 | ij_groovy_blank_lines_before_package = 0 1093 | ij_groovy_block_brace_style = end_of_line 1094 | ij_groovy_block_comment_add_space = false 1095 | ij_groovy_block_comment_at_first_column = true 1096 | ij_groovy_call_parameters_new_line_after_left_paren = false 1097 | ij_groovy_call_parameters_right_paren_on_new_line = false 1098 | ij_groovy_call_parameters_wrap = off 1099 | ij_groovy_catch_on_new_line = false 1100 | ij_groovy_class_annotation_wrap = split_into_lines 1101 | ij_groovy_class_brace_style = end_of_line 1102 | ij_groovy_class_count_to_use_import_on_demand = 5 1103 | ij_groovy_do_while_brace_force = never 1104 | ij_groovy_else_on_new_line = false 1105 | ij_groovy_enable_groovydoc_formatting = true 1106 | ij_groovy_enum_constants_wrap = off 1107 | ij_groovy_extends_keyword_wrap = off 1108 | ij_groovy_extends_list_wrap = off 1109 | ij_groovy_field_annotation_wrap = split_into_lines 1110 | ij_groovy_finally_on_new_line = false 1111 | ij_groovy_for_brace_force = never 1112 | ij_groovy_for_statement_new_line_after_left_paren = false 1113 | ij_groovy_for_statement_right_paren_on_new_line = false 1114 | ij_groovy_for_statement_wrap = off 1115 | ij_groovy_ginq_general_clause_wrap_policy = 2 1116 | ij_groovy_ginq_having_wrap_policy = 1 1117 | ij_groovy_ginq_indent_having_clause = true 1118 | ij_groovy_ginq_indent_on_clause = true 1119 | ij_groovy_ginq_on_wrap_policy = 1 1120 | ij_groovy_ginq_space_after_keyword = true 1121 | ij_groovy_if_brace_force = never 1122 | ij_groovy_import_annotation_wrap = 2 1123 | ij_groovy_imports_layout = *,|,javax.**,java.**,|,$* 1124 | ij_groovy_indent_case_from_switch = true 1125 | ij_groovy_indent_label_blocks = true 1126 | ij_groovy_insert_inner_class_imports = false 1127 | ij_groovy_keep_blank_lines_before_right_brace = 2 1128 | ij_groovy_keep_blank_lines_in_code = 2 1129 | ij_groovy_keep_blank_lines_in_declarations = 2 1130 | ij_groovy_keep_control_statement_in_one_line = true 1131 | ij_groovy_keep_first_column_comment = true 1132 | ij_groovy_keep_indents_on_empty_lines = false 1133 | ij_groovy_keep_line_breaks = true 1134 | ij_groovy_keep_multiple_expressions_in_one_line = false 1135 | ij_groovy_keep_simple_blocks_in_one_line = false 1136 | ij_groovy_keep_simple_classes_in_one_line = true 1137 | ij_groovy_keep_simple_lambdas_in_one_line = true 1138 | ij_groovy_keep_simple_methods_in_one_line = true 1139 | ij_groovy_label_indent_absolute = false 1140 | ij_groovy_label_indent_size = 0 1141 | ij_groovy_lambda_brace_style = end_of_line 1142 | ij_groovy_layout_static_imports_separately = true 1143 | ij_groovy_line_comment_add_space = false 1144 | ij_groovy_line_comment_add_space_on_reformat = false 1145 | ij_groovy_line_comment_at_first_column = true 1146 | ij_groovy_method_annotation_wrap = split_into_lines 1147 | ij_groovy_method_brace_style = end_of_line 1148 | ij_groovy_method_call_chain_wrap = off 1149 | ij_groovy_method_parameters_new_line_after_left_paren = false 1150 | ij_groovy_method_parameters_right_paren_on_new_line = false 1151 | ij_groovy_method_parameters_wrap = off 1152 | ij_groovy_modifier_list_wrap = false 1153 | ij_groovy_names_count_to_use_import_on_demand = 3 1154 | ij_groovy_packages_to_use_import_on_demand = java.awt.*,javax.swing.* 1155 | ij_groovy_parameter_annotation_wrap = off 1156 | ij_groovy_parentheses_expression_new_line_after_left_paren = false 1157 | ij_groovy_parentheses_expression_right_paren_on_new_line = false 1158 | ij_groovy_prefer_parameters_wrap = false 1159 | ij_groovy_resource_list_new_line_after_left_paren = false 1160 | ij_groovy_resource_list_right_paren_on_new_line = false 1161 | ij_groovy_resource_list_wrap = off 1162 | ij_groovy_space_after_assert_separator = true 1163 | ij_groovy_space_after_colon = true 1164 | ij_groovy_space_after_comma = true 1165 | ij_groovy_space_after_comma_in_type_arguments = true 1166 | ij_groovy_space_after_for_semicolon = true 1167 | ij_groovy_space_after_quest = true 1168 | ij_groovy_space_after_type_cast = true 1169 | ij_groovy_space_before_annotation_parameter_list = false 1170 | ij_groovy_space_before_array_initializer_left_brace = false 1171 | ij_groovy_space_before_assert_separator = false 1172 | ij_groovy_space_before_catch_keyword = true 1173 | ij_groovy_space_before_catch_left_brace = true 1174 | ij_groovy_space_before_catch_parentheses = true 1175 | ij_groovy_space_before_class_left_brace = true 1176 | ij_groovy_space_before_closure_left_brace = true 1177 | ij_groovy_space_before_colon = true 1178 | ij_groovy_space_before_comma = false 1179 | ij_groovy_space_before_do_left_brace = true 1180 | ij_groovy_space_before_else_keyword = true 1181 | ij_groovy_space_before_else_left_brace = true 1182 | ij_groovy_space_before_finally_keyword = true 1183 | ij_groovy_space_before_finally_left_brace = true 1184 | ij_groovy_space_before_for_left_brace = true 1185 | ij_groovy_space_before_for_parentheses = true 1186 | ij_groovy_space_before_for_semicolon = false 1187 | ij_groovy_space_before_if_left_brace = true 1188 | ij_groovy_space_before_if_parentheses = true 1189 | ij_groovy_space_before_method_call_parentheses = false 1190 | ij_groovy_space_before_method_left_brace = true 1191 | ij_groovy_space_before_method_parentheses = false 1192 | ij_groovy_space_before_quest = true 1193 | ij_groovy_space_before_record_parentheses = false 1194 | ij_groovy_space_before_switch_left_brace = true 1195 | ij_groovy_space_before_switch_parentheses = true 1196 | ij_groovy_space_before_synchronized_left_brace = true 1197 | ij_groovy_space_before_synchronized_parentheses = true 1198 | ij_groovy_space_before_try_left_brace = true 1199 | ij_groovy_space_before_try_parentheses = true 1200 | ij_groovy_space_before_while_keyword = true 1201 | ij_groovy_space_before_while_left_brace = true 1202 | ij_groovy_space_before_while_parentheses = true 1203 | ij_groovy_space_in_named_argument = true 1204 | ij_groovy_space_in_named_argument_before_colon = false 1205 | ij_groovy_space_within_empty_array_initializer_braces = false 1206 | ij_groovy_space_within_empty_method_call_parentheses = false 1207 | ij_groovy_spaces_around_additive_operators = true 1208 | ij_groovy_spaces_around_assignment_operators = true 1209 | ij_groovy_spaces_around_bitwise_operators = true 1210 | ij_groovy_spaces_around_equality_operators = true 1211 | ij_groovy_spaces_around_lambda_arrow = true 1212 | ij_groovy_spaces_around_logical_operators = true 1213 | ij_groovy_spaces_around_multiplicative_operators = true 1214 | ij_groovy_spaces_around_regex_operators = true 1215 | ij_groovy_spaces_around_relational_operators = true 1216 | ij_groovy_spaces_around_shift_operators = true 1217 | ij_groovy_spaces_within_annotation_parentheses = false 1218 | ij_groovy_spaces_within_array_initializer_braces = false 1219 | ij_groovy_spaces_within_braces = true 1220 | ij_groovy_spaces_within_brackets = false 1221 | ij_groovy_spaces_within_cast_parentheses = false 1222 | ij_groovy_spaces_within_catch_parentheses = false 1223 | ij_groovy_spaces_within_for_parentheses = false 1224 | ij_groovy_spaces_within_gstring_injection_braces = false 1225 | ij_groovy_spaces_within_if_parentheses = false 1226 | ij_groovy_spaces_within_list_or_map = false 1227 | ij_groovy_spaces_within_method_call_parentheses = false 1228 | ij_groovy_spaces_within_method_parentheses = false 1229 | ij_groovy_spaces_within_parentheses = false 1230 | ij_groovy_spaces_within_switch_parentheses = false 1231 | ij_groovy_spaces_within_synchronized_parentheses = false 1232 | ij_groovy_spaces_within_try_parentheses = false 1233 | ij_groovy_spaces_within_tuple_expression = false 1234 | ij_groovy_spaces_within_while_parentheses = false 1235 | ij_groovy_special_else_if_treatment = true 1236 | ij_groovy_ternary_operation_wrap = off 1237 | ij_groovy_throws_keyword_wrap = off 1238 | ij_groovy_throws_list_wrap = off 1239 | ij_groovy_use_flying_geese_braces = false 1240 | ij_groovy_use_fq_class_names = false 1241 | ij_groovy_use_fq_class_names_in_javadoc = true 1242 | ij_groovy_use_relative_indents = false 1243 | ij_groovy_use_single_class_imports = true 1244 | ij_groovy_variable_annotation_wrap = off 1245 | ij_groovy_while_brace_force = never 1246 | ij_groovy_while_on_new_line = false 1247 | ij_groovy_wrap_chain_calls_after_dot = false 1248 | ij_groovy_wrap_long_lines = false 1249 | 1250 | [{*.gradle.kts,*.kt,*.kts,*.main.kts,*.space.kts}] 1251 | ij_kotlin_align_in_columns_case_branch = false 1252 | ij_kotlin_align_multiline_binary_operation = false 1253 | ij_kotlin_align_multiline_extends_list = false 1254 | ij_kotlin_align_multiline_method_parentheses = false 1255 | ij_kotlin_align_multiline_parameters = true 1256 | ij_kotlin_align_multiline_parameters_in_calls = false 1257 | ij_kotlin_allow_trailing_comma = false 1258 | ij_kotlin_allow_trailing_comma_on_call_site = false 1259 | ij_kotlin_assignment_wrap = off 1260 | ij_kotlin_blank_lines_after_class_header = 0 1261 | ij_kotlin_blank_lines_around_block_when_branches = 0 1262 | ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1 1263 | ij_kotlin_block_comment_add_space = false 1264 | ij_kotlin_block_comment_at_first_column = true 1265 | ij_kotlin_call_parameters_new_line_after_left_paren = false 1266 | ij_kotlin_call_parameters_right_paren_on_new_line = false 1267 | ij_kotlin_call_parameters_wrap = off 1268 | ij_kotlin_catch_on_new_line = false 1269 | ij_kotlin_class_annotation_wrap = split_into_lines 1270 | ij_kotlin_continuation_indent_for_chained_calls = true 1271 | ij_kotlin_continuation_indent_for_expression_bodies = true 1272 | ij_kotlin_continuation_indent_in_argument_lists = true 1273 | ij_kotlin_continuation_indent_in_elvis = true 1274 | ij_kotlin_continuation_indent_in_if_conditions = true 1275 | ij_kotlin_continuation_indent_in_parameter_lists = true 1276 | ij_kotlin_continuation_indent_in_supertype_lists = true 1277 | ij_kotlin_else_on_new_line = false 1278 | ij_kotlin_enum_constants_wrap = off 1279 | ij_kotlin_extends_list_wrap = off 1280 | ij_kotlin_field_annotation_wrap = split_into_lines 1281 | ij_kotlin_finally_on_new_line = false 1282 | ij_kotlin_if_rparen_on_new_line = false 1283 | ij_kotlin_import_nested_classes = false 1284 | ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^ 1285 | ij_kotlin_insert_whitespaces_in_simple_one_line_method = true 1286 | ij_kotlin_keep_blank_lines_before_right_brace = 2 1287 | ij_kotlin_keep_blank_lines_in_code = 2 1288 | ij_kotlin_keep_blank_lines_in_declarations = 2 1289 | ij_kotlin_keep_first_column_comment = true 1290 | ij_kotlin_keep_indents_on_empty_lines = false 1291 | ij_kotlin_keep_line_breaks = true 1292 | ij_kotlin_lbrace_on_next_line = false 1293 | ij_kotlin_line_break_after_multiline_when_entry = true 1294 | ij_kotlin_line_comment_add_space = false 1295 | ij_kotlin_line_comment_add_space_on_reformat = false 1296 | ij_kotlin_line_comment_at_first_column = true 1297 | ij_kotlin_method_annotation_wrap = split_into_lines 1298 | ij_kotlin_method_call_chain_wrap = off 1299 | ij_kotlin_method_parameters_new_line_after_left_paren = false 1300 | ij_kotlin_method_parameters_right_paren_on_new_line = false 1301 | ij_kotlin_method_parameters_wrap = off 1302 | ij_kotlin_name_count_to_use_star_import = 5 1303 | ij_kotlin_name_count_to_use_star_import_for_members = 3 1304 | ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**,io.ktor.** 1305 | ij_kotlin_parameter_annotation_wrap = off 1306 | ij_kotlin_space_after_comma = true 1307 | ij_kotlin_space_after_extend_colon = true 1308 | ij_kotlin_space_after_type_colon = true 1309 | ij_kotlin_space_before_catch_parentheses = true 1310 | ij_kotlin_space_before_comma = false 1311 | ij_kotlin_space_before_extend_colon = true 1312 | ij_kotlin_space_before_for_parentheses = true 1313 | ij_kotlin_space_before_if_parentheses = true 1314 | ij_kotlin_space_before_lambda_arrow = true 1315 | ij_kotlin_space_before_type_colon = false 1316 | ij_kotlin_space_before_when_parentheses = true 1317 | ij_kotlin_space_before_while_parentheses = true 1318 | ij_kotlin_spaces_around_additive_operators = true 1319 | ij_kotlin_spaces_around_assignment_operators = true 1320 | ij_kotlin_spaces_around_equality_operators = true 1321 | ij_kotlin_spaces_around_function_type_arrow = true 1322 | ij_kotlin_spaces_around_logical_operators = true 1323 | ij_kotlin_spaces_around_multiplicative_operators = true 1324 | ij_kotlin_spaces_around_range = false 1325 | ij_kotlin_spaces_around_relational_operators = true 1326 | ij_kotlin_spaces_around_unary_operator = false 1327 | ij_kotlin_spaces_around_when_arrow = true 1328 | ij_kotlin_variable_annotation_wrap = off 1329 | ij_kotlin_while_on_new_line = false 1330 | ij_kotlin_wrap_elvis_expressions = 1 1331 | ij_kotlin_wrap_expression_body_functions = 0 1332 | ij_kotlin_wrap_first_method_in_call_chain = false 1333 | 1334 | [{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,composer.lock,jest.config}] 1335 | indent_size = 2 1336 | ij_json_array_wrapping = split_into_lines 1337 | ij_json_keep_blank_lines_in_code = 0 1338 | ij_json_keep_indents_on_empty_lines = false 1339 | ij_json_keep_line_breaks = true 1340 | ij_json_keep_trailing_comma = false 1341 | ij_json_object_wrapping = split_into_lines 1342 | ij_json_property_alignment = do_not_align 1343 | ij_json_space_after_colon = true 1344 | ij_json_space_after_comma = true 1345 | ij_json_space_before_colon = false 1346 | ij_json_space_before_comma = false 1347 | ij_json_spaces_within_braces = false 1348 | ij_json_spaces_within_brackets = false 1349 | ij_json_wrap_long_lines = false 1350 | 1351 | [{*.htm,*.html,*.ng,*.sht,*.shtm,*.shtml}] 1352 | ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3 1353 | ij_html_align_attributes = true 1354 | ij_html_align_text = false 1355 | ij_html_attribute_wrap = normal 1356 | ij_html_block_comment_add_space = false 1357 | ij_html_block_comment_at_first_column = true 1358 | ij_html_do_not_align_children_of_min_lines = 0 1359 | ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p 1360 | ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot 1361 | ij_html_enforce_quotes = false 1362 | ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var 1363 | ij_html_keep_blank_lines = 2 1364 | ij_html_keep_indents_on_empty_lines = false 1365 | ij_html_keep_line_breaks = true 1366 | ij_html_keep_line_breaks_in_text = true 1367 | ij_html_keep_whitespaces = false 1368 | ij_html_keep_whitespaces_inside = span,pre,textarea 1369 | ij_html_line_comment_at_first_column = true 1370 | ij_html_new_line_after_last_attribute = never 1371 | ij_html_new_line_before_first_attribute = never 1372 | ij_html_quote_style = double 1373 | ij_html_remove_new_line_before_tags = br 1374 | ij_html_space_after_tag_name = false 1375 | ij_html_space_around_equality_in_attribute = false 1376 | ij_html_space_inside_empty_tag = false 1377 | ij_html_text_wrap = normal 1378 | 1379 | [{*.j2,*.yaml,*.yml,.analysis_options,pubspec.lock}] 1380 | indent_size = 2 1381 | ij_yaml_align_values_properties = do_not_align 1382 | ij_yaml_autoinsert_sequence_marker = true 1383 | ij_yaml_block_mapping_on_new_line = false 1384 | ij_yaml_indent_sequence_value = true 1385 | ij_yaml_keep_indents_on_empty_lines = false 1386 | ij_yaml_keep_line_breaks = true 1387 | ij_yaml_sequence_on_new_line = false 1388 | ij_yaml_space_before_colon = false 1389 | ij_yaml_spaces_within_braces = true 1390 | ij_yaml_spaces_within_brackets = true 1391 | 1392 | [{*.jsf,*.jsp,*.jspf,*.tag,*.tagf,*.xjsp}] 1393 | ij_jsp_jsp_prefer_comma_separated_import_list = false 1394 | ij_jsp_keep_indents_on_empty_lines = false 1395 | 1396 | [{*.jspx,*.tagx}] 1397 | ij_jspx_keep_indents_on_empty_lines = false 1398 | 1399 | [{*.markdown,*.md}] 1400 | ij_markdown_force_one_space_after_blockquote_symbol = true 1401 | ij_markdown_force_one_space_after_header_symbol = true 1402 | ij_markdown_force_one_space_after_list_bullet = true 1403 | ij_markdown_force_one_space_between_words = true 1404 | ij_markdown_insert_quote_arrows_on_wrap = true 1405 | ij_markdown_keep_indents_on_empty_lines = false 1406 | ij_markdown_keep_line_breaks_inside_text_blocks = true 1407 | ij_markdown_max_lines_around_block_elements = 1 1408 | ij_markdown_max_lines_around_header = 1 1409 | ij_markdown_max_lines_between_paragraphs = 1 1410 | ij_markdown_min_lines_around_block_elements = 1 1411 | ij_markdown_min_lines_around_header = 1 1412 | ij_markdown_min_lines_between_paragraphs = 1 1413 | ij_markdown_wrap_text_if_long = true 1414 | ij_markdown_wrap_text_inside_blockquotes = true 1415 | 1416 | [{*.pb,*.textproto}] 1417 | indent_size = 2 1418 | tab_width = 2 1419 | ij_continuation_indent_size = 4 1420 | ij_prototext_keep_blank_lines_in_code = 2 1421 | ij_prototext_keep_indents_on_empty_lines = false 1422 | ij_prototext_keep_line_breaks = true 1423 | ij_prototext_space_after_colon = true 1424 | ij_prototext_space_after_comma = true 1425 | ij_prototext_space_before_colon = false 1426 | ij_prototext_space_before_comma = false 1427 | ij_prototext_spaces_within_braces = true 1428 | ij_prototext_spaces_within_brackets = false 1429 | 1430 | [{*.properties,*.property,spring.handlers,spring.schemas}] 1431 | ij_properties_align_group_field_declarations = false 1432 | ij_properties_keep_blank_lines = false 1433 | ij_properties_key_value_delimiter = equals 1434 | ij_properties_spaces_around_key_value_delimiter = false 1435 | 1436 | [{*.py,*.pyw}] 1437 | ij_python_align_collections_and_comprehensions = true 1438 | ij_python_align_multiline_imports = true 1439 | ij_python_align_multiline_parameters = true 1440 | ij_python_align_multiline_parameters_in_calls = true 1441 | ij_python_blank_line_at_file_end = true 1442 | ij_python_blank_lines_after_imports = 1 1443 | ij_python_blank_lines_after_local_imports = 0 1444 | ij_python_blank_lines_around_class = 1 1445 | ij_python_blank_lines_around_method = 1 1446 | ij_python_blank_lines_around_top_level_classes_functions = 2 1447 | ij_python_blank_lines_before_first_method = 0 1448 | ij_python_call_parameters_new_line_after_left_paren = false 1449 | ij_python_call_parameters_right_paren_on_new_line = false 1450 | ij_python_call_parameters_wrap = normal 1451 | ij_python_dict_alignment = 0 1452 | ij_python_dict_new_line_after_left_brace = false 1453 | ij_python_dict_new_line_before_right_brace = false 1454 | ij_python_dict_wrapping = 1 1455 | ij_python_from_import_new_line_after_left_parenthesis = false 1456 | ij_python_from_import_new_line_before_right_parenthesis = false 1457 | ij_python_from_import_parentheses_force_if_multiline = false 1458 | ij_python_from_import_trailing_comma_if_multiline = false 1459 | ij_python_from_import_wrapping = 1 1460 | ij_python_hang_closing_brackets = false 1461 | ij_python_keep_blank_lines_in_code = 1 1462 | ij_python_keep_blank_lines_in_declarations = 1 1463 | ij_python_keep_indents_on_empty_lines = false 1464 | ij_python_keep_line_breaks = true 1465 | ij_python_method_parameters_new_line_after_left_paren = false 1466 | ij_python_method_parameters_right_paren_on_new_line = false 1467 | ij_python_method_parameters_wrap = normal 1468 | ij_python_new_line_after_colon = false 1469 | ij_python_new_line_after_colon_multi_clause = true 1470 | ij_python_optimize_imports_always_split_from_imports = false 1471 | ij_python_optimize_imports_case_insensitive_order = false 1472 | ij_python_optimize_imports_join_from_imports_with_same_source = false 1473 | ij_python_optimize_imports_sort_by_type_first = true 1474 | ij_python_optimize_imports_sort_imports = true 1475 | ij_python_optimize_imports_sort_names_in_from_imports = false 1476 | ij_python_space_after_comma = true 1477 | ij_python_space_after_number_sign = true 1478 | ij_python_space_after_py_colon = true 1479 | ij_python_space_before_backslash = true 1480 | ij_python_space_before_comma = false 1481 | ij_python_space_before_for_semicolon = false 1482 | ij_python_space_before_lbracket = false 1483 | ij_python_space_before_method_call_parentheses = false 1484 | ij_python_space_before_method_parentheses = false 1485 | ij_python_space_before_number_sign = true 1486 | ij_python_space_before_py_colon = false 1487 | ij_python_space_within_empty_method_call_parentheses = false 1488 | ij_python_space_within_empty_method_parentheses = false 1489 | ij_python_spaces_around_additive_operators = true 1490 | ij_python_spaces_around_assignment_operators = true 1491 | ij_python_spaces_around_bitwise_operators = true 1492 | ij_python_spaces_around_eq_in_keyword_argument = false 1493 | ij_python_spaces_around_eq_in_named_parameter = false 1494 | ij_python_spaces_around_equality_operators = true 1495 | ij_python_spaces_around_multiplicative_operators = true 1496 | ij_python_spaces_around_power_operator = true 1497 | ij_python_spaces_around_relational_operators = true 1498 | ij_python_spaces_around_shift_operators = true 1499 | ij_python_spaces_within_braces = false 1500 | ij_python_spaces_within_brackets = false 1501 | ij_python_spaces_within_method_call_parentheses = false 1502 | ij_python_spaces_within_method_parentheses = false 1503 | ij_python_use_continuation_indent_for_arguments = false 1504 | ij_python_use_continuation_indent_for_collection_and_comprehensions = false 1505 | ij_python_use_continuation_indent_for_parameters = true 1506 | ij_python_wrap_long_lines = false 1507 | 1508 | [{*.qute.htm,*.qute.html,*.qute.json,*.qute.txt,*.qute.yaml,*.qute.yml}] 1509 | ij_qute_keep_indents_on_empty_lines = false 1510 | 1511 | [{*.toml,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,poetry.lock}] 1512 | ij_toml_keep_indents_on_empty_lines = false 1513 | --------------------------------------------------------------------------------