Package oracle.jdbc.diagnostics

## Class TraceAttributes

- java.lang.Object
- - oracle.jdbc.diagnostics.TraceAttributes

All Implemented Interfaces:
  `java.io.Serializable`, `java.lang.Iterable<TraceAttributes.Entry>`

Direct Known Subclasses:
  `ImmutableTraceAttributes`, `MutableTraceAttributes`

    public abstract class TraceAttributes
    extends java.lang.Object
    implements java.lang.Iterable<TraceAttributes.Entry>, java.io.Serializable

A fast, compact implementation of `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.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `TraceAttributes.Entry`

### Field Summary

Fields
`protected java.lang.String[]` `values`

### Constructor Summary

Constructors
`protected` `TraceAttributes()`
`protected` `TraceAttributes​(java.lang.String[] values)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Field Detail

#### values

    protected final java.lang.String[] values

### Constructor Detail

#### TraceAttributes

    protected TraceAttributes()

#### TraceAttributes

    protected TraceAttributes​(java.lang.String[] values)

### Method Detail

#### toReadOnly

    public abstract ImmutableTraceAttributes toReadOnly()

#### get

    public java.lang.String get​(java.lang.Object key)

Returns the value to which the specified key is mapped, or `null`

Parameters:
  `key` - the key whose associated value is to be returned
Returns:
  the value to which the specified key is mapped, or `null` if this map contains no mapping for the key
Throws:
  `java.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)

#### iterator

    public java.util.Iterator<TraceAttributes.Entry> iterator()

Returns an iterator over Entries.

Specified by:
  `iterator` in interface `java.lang.Iterable<TraceAttributes.Entry>`
Returns:
  an Iterator.