T
- the type of the Attribute
which can be accessed via this AttributeKey
.public final class AttributeKey<T> extends UniqueName
Attribute
out of the AttributeMap
. Be aware that it is not be
possible to have multiple keys with the same name.构造器和说明 |
---|
AttributeKey(java.lang.String name)
已过时。
Use
valueOf(String) instead. |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
exists(java.lang.String name)
|
static <T> AttributeKey<T> |
newInstance(java.lang.String name)
Creates a new
AttributeKey for the given or fail with an
IllegalArgumentException if a AttributeKey for the given exists. |
static <T> AttributeKey<T> |
valueOf(java.lang.String name)
Creates a new
AttributeKey with the specified or return the already existing
AttributeKey for the given name. |
compareTo, equals, hashCode, id, name, toString, validateArgs
@Deprecated public AttributeKey(java.lang.String name)
valueOf(String)
instead.public static <T> AttributeKey<T> valueOf(java.lang.String name)
AttributeKey
with the specified or return the already existing
AttributeKey
for the given name.public static boolean exists(java.lang.String name)
public static <T> AttributeKey<T> newInstance(java.lang.String name)
AttributeKey
for the given or fail with an
IllegalArgumentException
if a AttributeKey
for the given exists.