Skip to content

Commit 08230ca

Browse files
committed
feat: add immutable tri tuple
Closes #80
1 parent b061efc commit 08230ca

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

tuple/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Tuple
2+
3+
## Introduction
4+
5+
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.
6+
7+
## Features
8+
9+
- Immutable and mutable versions of bi-tuples (pairs) and tri-tuples (triplets);
10+
- Factory method of() for easy instantiation of all tuple types;
11+
- Simple, lightweight implementation compatible with standard Java usage;
12+
- Clear distinction between mutable and immutable tuples for flexibility.
13+
14+
## Installation
15+
16+
### Maven
17+
18+
Add the following dependency to your `pom.xml`:
19+
20+
```xml
21+
<dependency>
22+
<groupId>com.onixbyte</groupId>
23+
<artifactId>tuple</artifactId>
24+
<version>$artefactVersion</version>
25+
</dependency>
26+
```
27+
28+
### Gradle
29+
30+
#### Version Catalogue
31+
32+
Add the following codes to you `gradle/libs.versions.toml`:
33+
34+
```toml
35+
[version]
36+
onixbyteToolbox = "$artefactVersion"
37+
38+
[libraries]
39+
onixbyteToolbox-tuple = { group = "com.onixbyte", name = "tuple", version.ref = "onixbyteToolbox" }
40+
```
41+
42+
Then add the following codes to your `build.gradle.kts` or `build.gradle` dependencies block:
43+
44+
```kotlin
45+
implementation(libs.onixbyteToolbox.tuple)
46+
```
47+
48+
```groovy
49+
implementation libs.onixbyteToolbox.tuple
50+
```
51+
52+
#### Kotlin DSL
53+
54+
Add the following line to your `build.gradle.kts` dependencies block:
55+
56+
```kotlin
57+
implementation("com.onixbyte:tuple:$artefactVerison")
58+
```
59+
60+
#### Groovy DSL
61+
62+
Add the following line to your `build.gradle` dependencies block:
63+
64+
```groovy
65+
implementation 'com.onixbyte:tuple:${artefactVersion}'
66+
```
67+
68+
## Dependencies
69+
70+
This module has no external dependencies other than the standard Java SDK.
71+
72+
## Acknowledgement
73+
74+
Thanks to all contributors who helped develop this module, improving its design, performance, and documentation over time.

0 commit comments

Comments
 (0)