Pair

A tiny library that offers Pairs and nothing else.

License

License

GroupId

GroupId

de.scravy
ArtifactId

ArtifactId

pair
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Pair
A tiny library that offers Pairs and nothing else.
Project URL

Project URL

https://github.com/scravy/java-pair
Source Code Management

Source Code Management

https://github.com/scravy/java-pair

Download pair

How to add to project

<!-- https://jarcasting.com/artifacts/de.scravy/pair/ -->
<dependency>
    <groupId>de.scravy</groupId>
    <artifactId>pair</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/de.scravy/pair/
implementation 'de.scravy:pair:1.1.0'
// https://jarcasting.com/artifacts/de.scravy/pair/
implementation ("de.scravy:pair:1.1.0")
'de.scravy:pair:jar:1.1.0'
<dependency org="de.scravy" name="pair" rev="1.1.0">
  <artifact name="pair" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.scravy', module='pair', version='1.1.0')
)
libraryDependencies += "de.scravy" % "pair" % "1.1.0"
[de.scravy/pair "1.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
junit : junit jar 4.12

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.16.2

Project Modules

There are no modules declared in this project.

de.scravy : pair

Every know and then I found myself badly needing (wanting?) a Pair. A lot of libraries ship with either their own definition of a pair or pull in other libraries that provide one. But why should I use yet-another-utility-belt (most probably in addition to the one I already pulled in) just for having a Pair class when I do not need anything else from it?

It's in Maven Central

<dependency>
	<groupId>de.scravy</groupId>
	<artifactId>pair</artifactId>
	<version>1.0.0</version>
</dependency>

It's easy to use

Pair<Integer, Integer> myPair = Pairs.from(1, 2);

You want a comparable pair?

Pair<String, Integer> myPair = Pairs.fromComparables("foo", 42);

and so on - JAVADOCS at https://scravy.github.io/java-pair

Contributing

I do not see much that could be contributed, but if you have a crazy idea (maybe a handy utility function for Pairs), find a really bad bug, or whatever - please open an issue, send me a pull request, or mail me a patch.

License

MIT

Versions

Version
1.1.0
1.0.0