public class EntityProps<T extends EntityProps> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Properties |
props
附加属性,用于扩展
|
| Constructor and Description |
|---|
EntityProps() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
getEntityPropValue(Entity.Prop prop)
获取属性值
|
<V> V |
getProp(String prop)
获取属性值
|
<V> V |
getProp(String prop,
V def)
获取属性值
|
<V> V |
removeProp(String prop)
删除属性值
|
T |
setProp(Entity.Prop prop)
设置属性值
|
T |
setProp(String prop,
Object value)
设置属性值
|
<K,V> T |
setProps(Map<K,V> props)
设置属性值,这里不是替换原 props,而且整体追加到原 props
|
protected Properties props
public <V> V getProp(String prop)
prop - 属性名public <V> V getProp(String prop, V def)
prop - 属性名def - 默认值public T setProp(Entity.Prop prop)
prop - 注解信息public <K,V> T setProps(Map<K,V> props)
props - 属性public <V> V removeProp(String prop)
V - prop - 属性名public static Object getEntityPropValue(Entity.Prop prop)
prop - Copyright © 2022. All rights reserved.