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

com.tukeof.common.core.Triple Maven / Gradle / Ivy

The newest version!
package com.tukeof.common.core;

public class Triple extends Pair {

    private T3 third;

    public Triple(T1 first, T2 second, T3 third) {
        super(first, second);
        this.third = third;
    }

    public Triple(Pair pair, T3 third) {
        this(pair.first(), pair.second(), third);
    }

    public Triple(T1 first, Pair pair) {
        this(first, pair.first(), pair.second());
    }

    public T3 third() {
        return third;
    }

    @Override
    public String toString() {
        return String.format("(%s, %s, %s)",
                first().toString(), second().toString(), third().toString());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy