public abstract class TraceAttributes extends java.lang.Object implements java.lang.Iterable<TraceAttributes.Entry>, java.io.Serializable
Map<ConnectionAttribute, String>.
Diagnostics creates many of these so they need to be small and fast.
Since the keys are a known enum, the values are stored in an array indexed
by the enum ordinal. Null values are not allowed.| Modifier and Type | Class and Description |
|---|---|
static class |
TraceAttributes.Entry |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String[] |
values |
| Modifier | Constructor and Description |
|---|---|
protected |
TraceAttributes() |
protected |
TraceAttributes(java.lang.String[] values) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get(java.lang.Object key)
Returns the value to which the specified key is mapped,
or
null |
java.util.Iterator<TraceAttributes.Entry> |
iterator()
Returns an iterator over Entries.
|
abstract ImmutableTraceAttributes |
toReadOnly() |
protected TraceAttributes()
protected TraceAttributes(java.lang.String[] values)
public abstract ImmutableTraceAttributes toReadOnly()
public java.lang.String get(java.lang.Object key)
nullkey - the key whose associated value is to be returnednull if this map contains no mapping for the keyjava.lang.ClassCastException - if the key is of an inappropriate type for
this map
(optional)java.lang.NullPointerException - if the specified key is null and this map
does not permit null keys
(optional)public java.util.Iterator<TraceAttributes.Entry> iterator()
iterator in interface java.lang.Iterable<TraceAttributes.Entry>