Package org.aoju.bus.core.map
Class MapProxy
java.lang.Object
org.aoju.bus.core.map.MapProxy
- All Implemented Interfaces:
Serializable,InvocationHandler,Map<Object,,Object> TypeGetter<Object>
public class MapProxy
extends Object
implements Map<Object,Object>, TypeGetter<Object>, InvocationHandler, Serializable
Map代理,提供各种getXXX方法,并提供默认值支持
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()获取Object属性值booleanisEmpty()keySet()static MapProxy创建代理Map 此类对Map做一次包装,提供各种getXXX方法voidintsize()<T> TtoProxyBean(Class<T> interfaceClass) 将Map代理为指定接口的动态代理对象values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface org.aoju.bus.core.getter.TypeGetter
get, get, get, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBool, getBool, getByte, getByte, getBytes, getBytes, getChar, getChar, getDate, getDate, getDouble, getDouble, getEnum, getEnum, getFloat, getFloat, getInt, getInt, getLocalDate, getLocalDate, getLocalDateTime, getLocalDateTime, getLocalTime, getLocalTime, getLong, getLong, getNumber, getNumber, getObject, getShort, getShort, getSqlTime, getSqlTime, getSqlTimestamp, getSqlTimestamp, getString, getString
-
Constructor Details
-
MapProxy
-
-
Method Details
-
of
-
getObject
Description copied from interface:TypeGetter获取Object属性值- Specified by:
getObjectin interfaceTypeGetter<Object>- Parameters:
key- 属性名defaultValue- 默认值- Returns:
- 属性值,无对应值返回defaultValue
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKeyin interfaceMap<Object,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<Object,Object>
-
get
-
put
-
remove
-
putAll
-
clear
-
keySet
-
values
-
entrySet
-
invoke
-
toProxyBean
将Map代理为指定接口的动态代理对象- Type Parameters:
T- 代理的Bean类型- Parameters:
interfaceClass- 接口- Returns:
- 代理对象
-