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

com.artclod.common.base.T2 Maven / Gradle / Ivy

package com.artclod.common.base;

public class T2 {
	public final E1 _1;
	public final E2 _2;
	
	public T2(E1 _1, E2 _2) {
		this._1 = _1;
		this._2 = _2;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((_1 == null) ? 0 : _1.hashCode());
		result = prime * result + ((_2 == null) ? 0 : _2.hashCode());
		return result;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		T2 other = (T2) obj;
		if (_1 == null) {
			if (other._1 != null)
				return false;
		} else if (!_1.equals(other._1))
			return false;
		if (_2 == null) {
			if (other._2 != null)
				return false;
		} else if (!_2.equals(other._2))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "(" + _1 + ", " + _2 + ")";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy