public class DefaultAttributeMap extends java.lang.Object implements AttributeMap
AttributeMap
implementation which not exibit any blocking behaviour on attribute lookup while using a
copy-on-write approach on the modify path.O(logn)
time worst-case
complexity, hence attribute::set(null)
is to be preferred to remove
.构造器和说明 |
---|
DefaultAttributeMap() |
限定符和类型 | 方法和说明 |
---|---|
<T> Attribute<T> |
attr(AttributeKey<T> key)
Get the
Attribute for the given AttributeKey . |
<T> boolean |
hasAttr(AttributeKey<T> key)
|
public <T> Attribute<T> attr(AttributeKey<T> key)
AttributeMap
Attribute
for the given AttributeKey
. This method will never return null, but may return
an Attribute
which does not have a value set yet.attr
在接口中 AttributeMap
public <T> boolean hasAttr(AttributeKey<T> key)
AttributeMap
hasAttr
在接口中 AttributeMap