Skip to content

Commit

Permalink
Incorporated changes suggested by Daniel Fernandez (original author).…
Browse files Browse the repository at this point in the history
… README improvements.
  • Loading branch information
m-manu committed Oct 20, 2020
1 parent 64de838 commit 973c977
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 10 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
# javatuples

[![Build Status](https://api.travis-ci.org/flipkart-incubator/javatuples.svg?branch=master)](https://travis-ci.org/github/flipkart-incubator/javatuples)
[![Maven Central](https://img.shields.io/badge/sonatype-2.0-blue.svg)](https://oss.sonatype.org/content/repositories/releases/com/flipkart/javatuples/2.0/)
[![License](https://img.shields.io/badge/License-Apache%202-blue.svg)](./LICENSE.txt)

This is a fork of [javatuples](https://github.com/javatuples/javatuples) with following improvements/fixes:

1. Built on Java 8 using Maven 3 with latest plugins
2. Serialization (with popular libraries such as Jackson etc.) working correctly
* This has been tested for data types `boolean`, `int`, `String` and `double`
* Tested for tuples containing data types `boolean`, `int`, `String` and `double`

Even with above improvements, this fork maintains:

1. No change from original in its interface (your existing code should compile just fine when you upgrade to this)
2. Zero dependency on any library (needs only JDK)

## Usage
If you are using Maven, add below entry within the `dependencies` section of your `pom.xml`:

```xml
<dependency>
<groupId>com.flipkart.utils</groupId>
<artifactId>javatuples</artifactId>
<version>3.0</version>
</dependency>
```

See artifact details: [com.flipkart.utils:javatuples on **Maven Central**](https://search.maven.org/search?q=g:com.flipkart.utils%20AND%20a:javatuples&core=gav).

If you're using Gradle or Ivy or SBT, see how to include this library in your build:
[com.flipkart.utils:javatuples:3.0](https://mvnrepository.com/artifact/com.flipkart.utils/javatuples/3.0).

## How to build?
To build this project, follow below simple steps:

1. Do a `git clone` of this repository
2. Checkout latest stable version `git checkout v3.0`
3. Execute `mvn clean install` from shell

24 changes: 20 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<groupId>com.flipkart.utils</groupId>
<artifactId>javatuples</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
<version>3.0</version>
<name>javatuples</name>
<description>Java library for tuples in Java.</description>
<properties>
Expand All @@ -35,13 +35,13 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>The JAVATUPLES team</name>
<url>http://www.javatuples.org</url>
<name>Flipkart</name>
<url>https://www.flipkart.com</url>
</organization>
<url>https://github.com/flipkart-incubator/javatuples</url>
<scm>
Expand All @@ -56,6 +56,16 @@
<role>Project admin</role>
</roles>
</developer>
<developer>
<id>m-manu</id>
<name>Manu Manjunath</name>
<email>manu(dot)m(dot)karnataki(at)gmail(dot)com</email>
<roles>
<role>development</role>
</roles>
<organization>Flipkart</organization>
<organizationUrl>https://www.flipkart.com</organizationUrl>
</developer>
</developers>
<distributionManagement>
<repository>
Expand All @@ -82,6 +92,12 @@
<version>${jackson-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/javatuples/Decade.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Decade<A, B, C, D, E, F, G, H, I, J>
Expand Down Expand Up @@ -312,7 +313,7 @@ public I getValue8() {
public J getValue9() {
return this.val9;
}

public static int getSize() {
return SIZE;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Ennead.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Ennead<A, B, C, D, E, F, G, H, I>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Octet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Octet<A, B, C, D, E, F, G, H>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Pair.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Pair<A, B>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Quartet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Quartet<A, B, C, D>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Quintet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Quintet<A, B, C, D, E>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Septet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Septet<A, B, C, D, E, F, G>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Sextet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Sextet<A, B, C, D, E, F>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Triplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Triplet<A, B, C>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/javatuples/Unit.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* </p>
*
* @author Daniel Fern&aacute;ndez
* @author Manu Manjunath
* @since 1.0
*/
public final class Unit<A>
Expand Down

0 comments on commit 973c977

Please sign in to comment.