SpareJ is a set of high performance standard library extensions
.idea | ||
gradle/wrapper | ||
src | ||
.gitignore | ||
build.gradle.kts | ||
gradlew | ||
gradlew.bat | ||
LICENSE.md | ||
README.md | ||
settings.gradle.kts |
SpareJ
SpareJ is a set of high performance standard library extensions.
Installation
To include SpareJ in your project, add the appropriate repository and dependency configuration for your build tool.
Maven
Add the following repository to your pom.xml
:
<repositories>
<repository>
<id>spare-repo-mirror</id>
<name>SpareWTF Repository</name>
<url>https://repository.spare.wtf/mirror</url>
</repository>
</repositories>
Then, add the dependency:
<dependency>
<groupId>wtf.spare</groupId>
<artifactId>sparej</artifactId>
<version>1.0.0</version>
</dependency>
Gradle (Kotlin DSL)
Add the repository to your build.gradle.kts
:
repositories {
maven {
name = "spareRepoMirror"
url = uri("https://repository.spare.wtf/mirror")
}
}
Then, add the dependency:
dependencies {
implementation("wtf.spare:sparej:1.0.0")
}
Gradle (Groovy DSL)
Add the repository to your build.gradle
:
repositories {
maven {
name "spareRepoMirror"
url "https://repository.spare.wtf/mirror"
}
}
Then, add the dependency:
dependencies {
implementation "wtf.spare:sparej:1.0.0"
}
Javadoc
You can find the full Javadoc documentation here.
Usage Example
Here's a simple example demonstrating the use of MathUtil.average
:
import wtf.spare.sparej.MathUtil;
public class Example {
public static void main(String[] args) {
double[] numbers = {1.0, 2.0, 3.0, 4.0, 5.0};
double average = MathUtil.average(numbers);
System.out.println("Average: " + average); // Output: Average: 3.0
}
}