mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
enhance countAll
This commit is contained in:
parent
8c17979082
commit
d24ff836b8
@ -16,11 +16,13 @@
|
||||
* 【core 】 NumberUtil增加generateRandomNumber重载,可自定义seed(issue#I1XTUT@Gitee)
|
||||
* 【core 】 DataSizeUtil支持小数(pr#1158@Github)
|
||||
* 【core 】 完善注释(pr#193@Gitee)
|
||||
* 【core 】 优化Combination.countAll(pr#1159@Github)
|
||||
|
||||
### Bug修复
|
||||
* 【core 】 解决农历判断节日未判断大小月导致的问题(issue#I1XHSF@Gitee)
|
||||
* 【core 】 解决ListUtil计算总量可能的int溢出问题(pr#1150@Github)
|
||||
* 【json 】 解决JSON中转换为double小数精度丢失问题(pr#192@Gitee)
|
||||
* 【core 】 修复CaseInsensitiveMap的remove等方法并没有忽略大小写的问题(pr#1163@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -4,11 +4,10 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* 自定义键的Map,默认HashMap实现
|
||||
*
|
||||
* @author Looly
|
||||
*
|
||||
* @param <K> 键类型
|
||||
* @param <V> 值类型
|
||||
* @author Looly
|
||||
* @since 4.0.7
|
||||
*/
|
||||
public abstract class CustomKeyMap<K, V> extends MapWrapper<K, V> {
|
||||
@ -17,7 +16,7 @@ public abstract class CustomKeyMap<K, V> extends MapWrapper<K, V> {
|
||||
/**
|
||||
* 构造<br>
|
||||
* 通过传入一个Map从而确定Map的类型,子类需创建一个空的Map,而非传入一个已有Map,否则值可能会被修改
|
||||
*
|
||||
*
|
||||
* @param m Map 被包装的Map
|
||||
* @since 3.1.2
|
||||
*/
|
||||
@ -47,20 +46,30 @@ public abstract class CustomKeyMap<K, V> extends MapWrapper<K, V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public V remove(Object key) { return super.remove(customKey(key)); }
|
||||
public V remove(Object key) {
|
||||
return super.remove(customKey(key));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Object key, Object value) { return super.remove(customKey(key), value); }
|
||||
public boolean remove(Object key, Object value) {
|
||||
return super.remove(customKey(key), value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replace(K key, V oldValue, V newValue) { return super.replace((K) customKey(key), oldValue, newValue); }
|
||||
public boolean replace(K key, V oldValue, V newValue) {
|
||||
//noinspection unchecked
|
||||
return super.replace((K) customKey(key), oldValue, newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public V replace(K key, V value) { return super.replace((K) customKey(key), value); }
|
||||
public V replace(K key, V value) {
|
||||
//noinspection unchecked
|
||||
return super.replace((K) customKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义键
|
||||
*
|
||||
*
|
||||
* @param key KEY
|
||||
* @return 自定义KEY
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user