All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.underscore.Tuple Maven / Gradle / Ivy

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