Utility extensions, properties and useful methods to boost your programming with Kotlin.
Additionally funktionale-all
module from funKTionale is included.
Add the following repository to your pom.xml
:
<repositories>
<repository>
<id>central</id>
<url>http://34.210.110.148:8081/artifactory/libs-release</url>
</repository>
</repositories>
Add the following dependencies to your pom.xml
:
<dependencies>
<dependency>
<groupId>me.carleslc</groupId>
<artifactId>kotlin-extensions</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>org.funktionale</groupId>
<artifactId>funktionale-all</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
Add the following repository to your build.gradle
:
repositories {
url 'http://34.210.110.148:8081/artifactory/libs-release'
}
Add the following dependency to your build.gradle
:
dependencies {
compile(group: 'me.carleslc', name: 'kotlin-extensions', version: '0.2')
compile(group: 'org.funktionale', name: 'funktionale-all', version: '1.1')
}
git clone https://github.com/Carleslc/kotlin-extensions.git
cd kotlin-extensions
- Build the KotlinExtensions with
mvn clean install
. This also adds this project to your local Maven repository. - Add the
kotlin-extensions-0.2.jar
fromtarget
folder as a dependency of your project. git clone https://github.com/MarioAriasC/funKTionale
- cd
funKTionale/funktionale-all
- Build the functionale-all with
mvn clean install
. This also adds this project to your local Maven repository. - Add the
funktionale-all-1.1.jar
fromtarget
folder as a dependency of your project.
If you wish you can use these steps to add the dependency using Maven without accessing to the remote repository.
In order to use any of the extensions or methods of KotlinExtensions you only need to import them.
import me.carleslc.kotlin.extensions.standard.UtilsExtensions.times
import me.carleslc.kotlin.extensions.standard.*
funKTionale library is included, so you can use any methods of that library.
import org.funktionale.collections
import org.funktionale.complement
import org.funktionale.composition
import org.funktionale.currying
import org.funktionale.either
import org.funktionale.memoization
import org.funktionale.option
import org.funktionale.pairing
import org.funktionale.partials
import org.funktionale.pipe
import org.funktionale.reverse
import org.funktionale.state
import org.funktionale.tries
import org.funktionale.utils
import org.funktionale.validation
import me.carleslc.kotlin.extensions.arrays.*
Extensions for arrays, a syntactic-sugar way to create literal arrays like A[1, 2, 3]
instead typical arrayOf(1, 2, 3)
and methods to work with 2D arrays and matrices (2D arrays with fixed columns size) easier.
import me.carleslc.kotlin.extensions.collections.*
Extensions for collections and other global methods to create collections.
import me.carleslc.kotlin.extensions.html.*
Extensions to generate HTML in a more readable way.
import me.carleslc.kotlin.extensions.map.*
import me.carleslc.kotlin.extensions.map.TupleExtensions.*
import me.carleslc.kotlin.extensions.map.MapExtensions.*
Extensions for maps and tuples (pairs).
import me.carleslc.kotlin.extensions.number.*
Extensions for numbers and conversions.
import me.carleslc.kotlin.extensions.strings.*
Extensions for strings.
import me.carleslc.kotlin.extensions.time.*
Global methods to format time easily.
import me.carleslc.kotlin.extensions.standard.*
General purpose extensions and global methods that do not match any other package category (e.g. looping with 10 times { /* code */ }
as an alias for repeat(10) { /* code */ }
).