KeyValue.java

/*
 * Decompiled with CFR 0_132.
 */
package org.xutils.common.util;

public class KeyValue {
    public final String key;
    public final Object value;

    public KeyValue(String key, Object value) {
        this.key = key;
        this.value = value;
    }

    public String getValueStr() {
        return this.value == null ? null : this.value.toString();
    }

    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }
        KeyValue keyValue = (KeyValue)o;
        return this.key == null ? keyValue.key == null : this.key.equals(keyValue.key);
    }

    public int hashCode() {
        return this.key != null ? this.key.hashCode() : 0;
    }

    public String toString() {
        return "KeyValue{key='" + this.key + '\'' + ", value=" + this.value + '}';
    }
}