The tuple module provides simple and efficient implementations of mutable and immutable bi-tuples and tri-tuples. These tuples allow you to group two or three values together without creating custom classes, supporting convenient usage in various programming scenarios.
- Immutable and mutable versions of bi-tuples (pairs) and tri-tuples (triplets);
- Factory method of() for easy instantiation of all tuple types;
- Simple, lightweight implementation compatible with standard Java usage;
- Clear distinction between mutable and immutable tuples for flexibility.
Add the following dependency to your pom.xml:
<dependency>
<groupId>com.onixbyte</groupId>
<artifactId>tuple</artifactId>
<version>$artefactVersion</version>
</dependency>Add the following codes to you gradle/libs.versions.toml:
[version]
onixbyteToolbox = "$artefactVersion"
[libraries]
onixbyteToolbox-tuple = { group = "com.onixbyte", name = "tuple", version.ref = "onixbyteToolbox" }Then add the following codes to your build.gradle.kts or build.gradle dependencies block:
implementation(libs.onixbyteToolbox.tuple)implementation libs.onixbyteToolbox.tupleAdd the following line to your build.gradle.kts dependencies block:
implementation("com.onixbyte:tuple:$artefactVersion")Add the following line to your build.gradle dependencies block:
implementation 'com.onixbyte:tuple:${artefactVersion}'This module has no external dependencies other than the standard Java SDK.
Thanks to all contributors who helped develop this module, improving its design, performance, and documentation over time.