Triple.java [src/java/crlmod/element] Revision: Date:
/*
* $Id: 1.0+62 Triple.java a170e1637ffa 2021-12-20 od $
*
* This file is part of the Cloud Services Integration Platform (CSIP),
* a Model-as-a-Service framework, API, and application suite.
*
* 2012-2024, OMSLab, Colorado State University.
*
* OMSLab licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
package crlmod.element;
import java.util.Objects;
/**
*
* @author brad
*/
@Deprecated
public class Triple<X, Y, Z> {
private final X x;
private final Y y;
private final Z z;
public Triple(X x, Y y, Z z) {
this.x = x;
this.y = y;
this.z = z;
}
public X getX() { // param name
return x;
}
public Y getY() { // param value
return y;
}
public Z getZ() { // obj reference
return z;
}
@Override
public int hashCode() {
int hash = 3;
hash = 59 * hash + Objects.hashCode(this.x);
hash = 59 * hash + Objects.hashCode(this.y);
hash = 59 * hash + Objects.hashCode(this.z);
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Triple<?, ?, ?> other = (Triple<?, ?, ?>) obj;
if (!Objects.equals(this.x, other.x)) {
return false;
}
return true;
}
}