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.Constructor and Description |
---|
AttributeKey(java.lang.String name)
Deprecated.
Use
valueOf(String) instead. |
Modifier and Type | Method and Description |
---|---|
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.Copyright © 2008–2018 The Netty Project. All rights reserved.