com.g2forge.alexandria.java.tuple.implementations.Tuple2GSO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-java Show documentation
Show all versions of ax-java Show documentation
Standard Java library and the basis of the ${alexandria.name} project.
package com.g2forge.alexandria.java.tuple.implementations;
import java.util.Objects;
import com.g2forge.alexandria.java.tuple.ITuple2GS;
public class Tuple2GSO extends Tuple1GSO implements ITuple2GS {
protected T1 value1;
public Tuple2GSO() {
this(null, null);
}
public Tuple2GSO(final T0 value0, final T1 value1) {
super(value0);
this.value1 = value1;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!super.equals(obj)) return false;
if (getClass() != obj.getClass()) return false;
final Tuple2G_O, ?> that = (Tuple2G_O, ?>) obj;
return Objects.equals(get0(), that.get0()) && Objects.equals(get1(), that.get1());
}
@Override
public T1 get1() {
return value1;
}
@Override
public int hashCode() {
return Objects.hash(get0(), get1());
}
@Override
public ITuple2GS set0(final T0 value) {
value0 = value;
return this;
}
@Override
public ITuple2GS set1(final T1 value) {
this.value1 = value;
return this;
}
}