Top Description Inners Fields Methods
org.eclipse.jetty.util

public Interface Attributes

Known Direct Subinterfaces
org.eclipse.jetty.util.component.Environment
Known Direct Implementers
org.eclipse.jetty.util.Attributes.Wrapper, org.eclipse.jetty.util.Attributes.Mapped, org.eclipse.jetty.util.Attributes.Lazy, org.eclipse.jetty.util.AttributesMap, org.eclipse.jetty.util.component.AttributeContainerMap
Imports
java.io.IOException, java.util.AbstractMap, .AbstractSet, .Collections, .HashMap, .HashSet, .Iterator, .Map, .Objects, .Set, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, java.util.concurrent.atomic.AtomicReference, org.eclipse.jetty.util.component.Dumpable

Attributes. Interface commonly used for storing attributes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Attributes.Layer

An Attributes implementation backed by another Attributes instance, which is treated as immutable, but with a ConcurrentHashMap used as a mutable layer over it.

public static class
Attributes.Lazy

An Attributes implementation that lazily creates a backing map iff it is actually needed.

public static class
Attributes.Mapped

An Attributes implementation backed by a ConcurrentHashMap.

public abstract static class
Attributes.Synthetic

An abstract implementation of Attributes.Wrapper that provides a mechanism for synthetic attributes that can be modified or deleted.

public static class
Attributes.Wrapper

A Wrapper of attributes

Field Summary

Modifier and TypeField and Description
public static final Attributes

Method Summary

Modifier and TypeMethod and Description
public default Map<String, Object>
public default void
clearAttributes()

Clear all attribute names

public boolean
public static boolean
equals(Attributes attributes, Object o)

public Object

Returns:

the value of the attribute
getAttribute
(String
the attribute to get
name
)

Get an attribute

public Set<String>

Returns:

Set of attribute names
getAttributeNameSet
()

Get the immutable set of attribute names.

public int
public static int
hashCode(Attributes attributes)

public Object

Returns:

the value of the attribute if removed, else null
removeAttribute
(String
the attribute to remove
name
)

Remove an attribute

public Object

Returns:

the previous value of the attribute if set, else null
setAttribute
(String
the attribute to set
name
,
Object
the value to set. A null value is equivalent to removing the attribute.
attribute
)

Set an attribute

public static Attributes

Returns:

The core attributes
unwrap
(Attributes
The attributes to unwrap, which may be a Wrapper.
attributes
)

Unwrap all Wrappers of the attributes

public static <
The type of the target Wrapper.
T extends Attributes.Wrapper
>
T

Returns:

The outermost Wrapper of the matching type of null if not found.
unwrap
(Attributes
The attributes to unwrap, which may be a Wrapper
attributes
,
Class<T>
The target Wrapper class.
target
)

Unwrap attributes to a specific attribute Wrapper.