("tuple") {
- groupId = group.toString()
- artifactId = "tuple"
- version = tupleVersion
-
- pom {
- name = "OnixByte Tuple"
- description =
- "The tuple module is designed to offer a convenient and efficient way to handle grouped data."
- url = projectUrl
-
- licenses {
- license {
- name = licenseName
- url = licenseUrl
- }
- }
-
- scm {
- connection = "scm:git:git://github.com:onixbyte/onixbyte-toolbox.git"
- developerConnection = "scm:git:git://github.com:onixbyte/onixbyte-toolbox.git"
- url = projectGithubUrl
- }
-
- developers {
- developer {
- id = "zihluwang"
- name = "Zihlu Wang"
- email = "really@zihlu.wang"
- timezone = "Asia/Hong_Kong"
- }
-
- developer {
- id = "siujamo"
- name = "Siu Jam'o"
- email = "jamo.siu@outlook.com"
- timezone = "Asia/Shanghai"
- }
- }
- }
-
- from(components["java"])
-
- signing {
- setRequired(project.hasProperty("signing.keyId"))
- sign(publishing.publications["tuple"])
- }
- }
-
- repositories {
- maven {
- name = "sonatypeNexus"
- url = URI(providers.gradleProperty("repo.maven-central.host").get())
- credentials {
- username = providers.gradleProperty("repo.maven-central.username").get()
- password = providers.gradleProperty("repo.maven-central.password").get()
- }
- }
- }
- }
-}
diff --git a/tuple/src/main/java/com/onixbyte/tuple/ImmutableTriple.java b/tuple/src/main/java/com/onixbyte/tuple/ImmutableTriple.java
deleted file mode 100644
index 26d43ac..0000000
--- a/tuple/src/main/java/com/onixbyte/tuple/ImmutableTriple.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2024-2026 OnixByte
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.onixbyte.tuple;
-
-/**
- * Represents an immutable triple of three elements, referred to as 'left', 'middle', and 'right'.
- * This class provides a generic way to group three values without the need to create a custom class
- * for each specific combination.
- *
- * The generic types {@code L}, {@code M}, and {@code R} denote the types of the left, middle, and
- * right elements, respectively. Instances of this class are immutable once created.
- *
- * @param the type of the left element
- * @param the type of the middle element
- * @param the type of the right element
- * @param left the left element of this triple
- * @param middle the middle element of this triple
- * @param right the right element of this triple
- * @author siujamo
- * @author zihluwang
- */
-public record ImmutableTriple(
- L left,
- M middle,
- R right
-) {
-
- /**
- * Creates a new {@code ImmutableTriple} with the specified left, middle, and right elements.
- *
- * @param the type of the left element
- * @param the type of the middle element
- * @param the type of the right element
- * @param left the left element
- * @param middle the middle element
- * @param right the right element
- * @return a new {@code ImmutableTriple} containing the specified elements
- */
- public static ImmutableTriple of(L left, M middle, R right) {
- return new ImmutableTriple<>(left, middle, right);
- }
-}
diff --git a/tuple/src/main/java/com/onixbyte/tuple/ImmutableTuple.java b/tuple/src/main/java/com/onixbyte/tuple/ImmutableTuple.java
deleted file mode 100644
index 6e31e46..0000000
--- a/tuple/src/main/java/com/onixbyte/tuple/ImmutableTuple.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2024-2026 OnixByte
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.onixbyte.tuple;
-
-/**
- * Represents an immutable pair of two elements, referred to as 'left' and 'right'. This class
- * provides a simple way to group two values without the need to create a custom class for each
- * specific pair.
- *
- * The generic types {@code L} and {@code R} denote the types of the left and right elements,
- * respectively. Instances of this class are immutable once created.
- *
- * @param the type of the left element
- * @param the type of the right element
- * @param left the left element of this tuple
- * @param right the right element of this tuple
- * @author siujamo
- * @author zihluwang
- */
-public record ImmutableTuple(
- L left,
- R right
-) {
-
- /**
- * Creates a new {@code ImmutableTuple} with the specified left and right elements.
- *
- * @param the type of the left element
- * @param the type of the right element
- * @param left the left element
- * @param right the right element
- * @return a new {@code ImmutableTuple} containing the specified elements
- */
- public static ImmutableTuple of(L left, R right) {
- return new ImmutableTuple<>(left, right);
- }
-}
diff --git a/tuple/src/main/java/com/onixbyte/tuple/Triple.java b/tuple/src/main/java/com/onixbyte/tuple/Triple.java
deleted file mode 100644
index 531e196..0000000
--- a/tuple/src/main/java/com/onixbyte/tuple/Triple.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2024-2026 OnixByte
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.onixbyte.tuple;
-
-import java.util.Objects;
-
-/**
- * Represents a mutable triple of three elements, referred to as 'left', 'middle' and 'right'.
- * This class provides a way to group three values of different types.
- *
- * The generic types {@code L}, {@code M} and {@code R} denote the types of the left, middle and
- * right elements respectively.
- *
- * @param the type of the left element
- * @param the type of the middle element
- * @param the type of the right element
- * @author siujamo
- * @author zihluwang
- */
-public final class Triple {
-
- private L left;
- private M middle;
- private R right;
-
- /**
- * Constructs a new {@code Triple} with the given left, middle and right elements.
- *
- * @param left the left element
- * @param middle the middle element
- * @param right the right element
- */
- public Triple(L left, M middle, R right) {
- this.left = left;
- this.middle = middle;
- this.right = right;
- }
-
- /**
- * Retrieves the left element of the triple.
- *
- * @return the left element
- */
- public L getLeft() {
- return left;
- }
-
- /**
- * Sets the left element of the triple.
- *
- * @param left the new left element
- */
- public void setLeft(L left) {
- this.left = left;
- }
-
- /**
- * Retrieves the middle element of the triple.
- *
- * @return the middle element
- */
- public M getMiddle() {
- return middle;
- }
-
- /**
- * Sets the middle element of the triple.
- *
- * @param middle the new middle element
- */
- public void setMiddle(M middle) {
- this.middle = middle;
- }
-
- /**
- * Retrieves the right element of the triple.
- *
- * @return the right element
- */
- public R getRight() {
- return right;
- }
-
- /**
- * Sets the right element of the triple.
- *
- * @param right the new right element
- */
- public void setRight(R right) {
- this.right = right;
- }
-
- /**
- * Checks if this {@code Triple} is equal to the specified object. Two {@code Triple}s are
- * considered equal if their left, middle and right elements are equal.
- *
- * @param object the object to compare with
- * @return {@code true} if the objects are equal, {@code false} otherwise
- */
- @Override
- public boolean equals(Object object) {
- if (!(object instanceof Triple, ?, ?> triple)) return false;
- return Objects.equals(left, triple.left) &&
- Objects.equals(middle, triple.middle) &&
- Objects.equals(right, triple.right);
- }
-
- /**
- * Calculates the hash code for this {@code Triple} based on its left, middle and
- * right elements.
- *
- * @return the hash code value for this object
- */
- @Override
- public int hashCode() {
- return Objects.hash(left, middle, right);
- }
-
- /**
- * Returns a string representation of this {@code Triple}, including its left, middle and
- * right elements.
- *
- * @return a string representation of the object
- */
- @Override
- public String toString() {
- return "Triple{" +
- "left=" + left +
- ", middle=" + middle +
- ", right=" + right +
- '}';
- }
-
- /**
- * Factory method to create a new {@code Triple} instance with the given left, middle and right elements.
- *
- * @param left the left element
- * @param middle the middle element
- * @param right the right element
- * @param the type of the left element
- * @param the type of the middle element
- * @param the type of the right element
- * @return a new {@code Triple} instance
- */
- public static Triple of(L left, M middle, R right) {
- return new Triple<>(left, middle, right);
- }
-}
diff --git a/tuple/src/main/java/com/onixbyte/tuple/Tuple.java b/tuple/src/main/java/com/onixbyte/tuple/Tuple.java
deleted file mode 100644
index 9763941..0000000
--- a/tuple/src/main/java/com/onixbyte/tuple/Tuple.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2024-2026 OnixByte
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.onixbyte.tuple;
-
-import java.util.Objects;
-
-/**
- * Represents an ordered pair of elements, where the first element is of type {@code L} and the
- * second is of type {@code R}. This class provides a simple way to group two related
- * values together.
- *
- * The class is mutable, allowing the values of the left and right elements to be changed
- * after creation. It also overrides the {@code equals}, {@code hashCode}, and {@code toString}
- * methods to provide meaningful comparisons and string representations.
- *
- * @param the type of the left element
- * @param the type of the right element
- * @author siujamo
- * @author zihluwang
- */
-public final class Tuple {
-
- private L left;
- private R right;
-
- /**
- * Constructs a new {@code Tuple} with the specified left and right elements.
- *
- * @param left the left element to be stored in the tuple
- * @param right the right element to be stored in the tuple
- */
- public Tuple(L left, R right) {
- this.left = left;
- this.right = right;
- }
-
- /**
- * Retrieves the left element of the tuple.
- *
- * @return the left element of the tuple
- */
- public L getLeft() {
- return left;
- }
-
- /**
- * Sets the left element of the tuple to the specified value.
- *
- * @param left the new value for the left element of the tuple
- */
- public void setLeft(L left) {
- this.left = left;
- }
-
- /**
- * Retrieves the right element of the tuple.
- *
- * @return the right element of the tuple
- */
- public R getRight() {
- return right;
- }
-
- /**
- * Sets the right element of the tuple to the specified value.
- *
- * @param right the new value for the right element of the tuple
- */
- public void setRight(R right) {
- this.right = right;
- }
-
- /**
- * Compares this {@code Tuple} with the specified object for equality.
- *
- * Two {@code Tuple}s are considered equal if they are of the same type and their left and
- * right elements are equal according to their respective {@code equals} methods.
- *
- * @param object the object to compare with this {@code Tuple}
- * @return {@code true} if the specified object is equal to this {@code Tuple},
- * {@code false} otherwise
- */
- @Override
- public boolean equals(Object object) {
- if (!(object instanceof Tuple, ?> tuple)) return false;
- return Objects.equals(left, tuple.left) && Objects.equals(right, tuple.right);
- }
-
- /**
- * Returns a hash code value for the {@code Tuple}.
- *
- * The hash code is calculated based on the hash codes of the left and right elements.
- *
- * @return a hash code value for this {@code Tuple}
- */
- @Override
- public int hashCode() {
- return Objects.hash(left, right);
- }
-
- /**
- * Returns a string representation of the {@code Tuple}.
- *
- * The string representation consists of the class name, followed by the values of
- * the left and right elements in the format {@code "Tuple{left=value1, right=value2}"}.
- *
- * @return a string representation of the {@code Tuple}
- */
- @Override
- public String toString() {
- return "Tuple{" +
- "left=" + left +
- ", right=" + right +
- '}';
- }
-
- /**
- * Creates a new {@code Tuple} with the specified left and right elements.
- *
- * @param the type of the left element
- * @param the type of the right element
- * @param left the left element
- * @param right the right element
- * @return a new {@code Tuple} containing the specified elements
- */
- public static Tuple of(L left, R right) {
- return new Tuple<>(left, right);
- }
-}