com.github.underscore.Tuple Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of underscore8 Show documentation
Show all versions of underscore8 Show documentation
The java 8 port of Underscore.js
The newest version!
package com.github.underscore;
public class Tuple {
private final A first;
private final B second;
public Tuple(final A first, final B second) {
super();
this.first = first;
this.second = second;
}
public static Tuple create(final A a, final B b) {
return new Tuple(a, b);
}
public A fst() {
return first;
}
public B snd() {
return second;
}
@Override
public String toString() {
return "(" + first + ", " + second + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy