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

zhao.algorithmMagic.utils.dataContainer.KeyValue Maven / Gradle / Ivy

There is a newer version: 1.42
Show newest version
package zhao.algorithmMagic.utils.dataContainer;

import java.io.Serializable;

/**
 * @author 赵凌宇
 * 2023/4/17 20:24
 */
public final class KeyValue implements Serializable {
    private final k key;
    private final v value;

    public KeyValue(k key, v value) {
        this.key = key;
        this.value = value;
    }

    public k getKey() {
        return key;
    }

    public v getValue() {
        return value;
    }

    @Override
    public String toString() {
        return '{' +
                "key:\"" + key +
                "\", value:\"" + value +
                "\"}";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy