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

com.flextrade.jfixture.utility.KeyValuePair Maven / Gradle / Ivy

Go to download

JFixture is an open source library based on the popular .NET library, AutoFixture

There is a newer version: 2.7.2
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy