top.cutexingluo.tools.common.data.Tuple Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xingtools-core Show documentation
Show all versions of xingtools-core Show documentation
xingtools 核心,包括各种接口,实体类和工具类
package top.cutexingluo.tools.common.data;
import java.util.Map;
/**
* 二元组接口
* 继承 {@link Map.Entry} 和 {@link PairEntry}
* A map entry (key-value pair). like Map.Entry
* 拥有 set 和 get 方法
*
* @author XingTian
* @version 1.0.0
* @date 2024/7/23 17:50
* @since 1.1.2
*/
public interface Tuple extends Map.Entry, PairEntry {
/**
* @return the key corresponding to this entry
*/
K getKey();
/**
* @return the value corresponding to this entry
*/
V getValue();
/**
* @param key new key to be stored in this entry
* @return {@link K } old key corresponding to the entry
*/
K setKey(K key);
/**
* @param value new value to be stored in this entry
* @return {@link V } old value corresponding to the entry
*/
V setValue(V value);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy