Kotlinize is a small Java utility library that brings Kotlin-style functionality to Java projects.
Key features
- Null-safe calls, functionality similar to Kotlin's
elvis(?.) operator - Implementations of Kotlin's standard library functions:
- Implementation of Kotlin scope functions:
let,also,with - Delegate primitives: lazy, observable, vetoable
- Simplified try-with-resources via
usefunction - Implementation of Kotlin range functionality
For Maven projects, add dependency to your pom.xml:
<dependency>
<groupId>co.bitshifted</groupId>
<artifactId>kotlinize</artifactId>
<version>latest version</version>
</dependency>For Gradle projects, add the following to your build.gradle:
implementation 'co.bitshifted:kotlinize:latest version'- This project is distributed under the Mozilla Public License 2.0 (MPL-2.0). See the
LICENSEfile for full text.
- Feel free to open issues or pull requests on the upstream repository.