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

net.servicestack.func.Tuple3 Maven / Gradle / Ivy

The newest version!
//  Copyright (c) 2013-present ServiceStack, Inc. All rights reserved.
//  License: https://servicestack.net/bsd-license.txt

package net.servicestack.func;

public class Tuple3 {
    public A A;
    public B B;
    public C C;

    public Tuple3(A a, B b, C c) {
        A = a;
        B = b;
        C = c;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Tuple3)) return false;
        Tuple3 tuple3 = (Tuple3) o;
        if (A != null ? !A.equals(tuple3.A) : tuple3.A != null) return false;
        if (B != null ? !B.equals(tuple3.B) : tuple3.B != null) return false;
        return !(C != null ? !C.equals(tuple3.C) : tuple3.C != null);
    }

    @Override
    public int hashCode() {
        int result = A != null ? A.hashCode() : 0;
        result = 31 * result + (B != null ? B.hashCode() : 0);
        result = 31 * result + (C != null ? C.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "(" + A + ", " + B + ", " + C + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy