com.flextrade.jfixture.utility.KeyValuePair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfixture Show documentation
Show all versions of jfixture Show documentation
JFixture is an open source library based on the popular .NET library, AutoFixture
package com.flextrade.jfixture.utility;
public class KeyValuePair {
private final Object key;
private final Object value;
public KeyValuePair(Object key, Object value) {
this.key = key;
this.value = value;
}
public Object getKey() {
return this.key;
}
public Object getValue() {
return this.value;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
KeyValuePair that = (KeyValuePair) o;
return key.equals(that.key) && value.equals(that.value);
}
@Override
public int hashCode() {
int result = key.hashCode();
result = 31 * result + value.hashCode();
return result;
}
}