-
- All Known Implementing Classes:
AttributeContainerMap,Attributes.Wrapper,AttributesMap
public interface AttributesAttributes. Interface commonly used for storing attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAttributes.WrapperA Wrapper of attributes
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclearAttributes()java.lang.ObjectgetAttribute(java.lang.String name)default java.util.Enumeration<java.lang.String>getAttributeNames()java.util.Set<java.lang.String>getAttributeNameSet()voidremoveAttribute(java.lang.String name)voidsetAttribute(java.lang.String name, java.lang.Object attribute)static Attributesunwrap(Attributes attributes)Unwrap allAttributes.Wrappers of the attributesstatic <T extends Attributes.Wrapper>
Tunwrap(Attributes attributes, java.lang.Class<T> target)Unwrap attributes to a specific attributeAttributes.Wrapper.
-
-
-
Method Detail
-
removeAttribute
void removeAttribute(java.lang.String name)
-
setAttribute
void setAttribute(java.lang.String name, java.lang.Object attribute)
-
getAttribute
java.lang.Object getAttribute(java.lang.String name)
-
getAttributeNameSet
java.util.Set<java.lang.String> getAttributeNameSet()
-
getAttributeNames
default java.util.Enumeration<java.lang.String> getAttributeNames()
-
clearAttributes
void clearAttributes()
-
unwrap
static Attributes unwrap(Attributes attributes)
Unwrap allAttributes.Wrappers of the attributes- Parameters:
attributes- The attributes to unwrap, which may be aAttributes.Wrapper.- Returns:
- The core attributes
-
unwrap
static <T extends Attributes.Wrapper> T unwrap(Attributes attributes, java.lang.Class<T> target)
Unwrap attributes to a specific attributeAttributes.Wrapper.- Type Parameters:
T- The type of the targetAttributes.Wrapper.- Parameters:
attributes- The attributes to unwrap, which may be aAttributes.Wrappertarget- The targetAttributes.Wrapperclass.- Returns:
- The outermost
Attributes.Wrapperof the matching type of null if not found.
-
-