Class 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 
      Modifier and Type Class Description
      static class  TraceAttributes.Entry  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String[] values  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TraceAttributes()  
      protected TraceAttributes​(java.lang.String[] values)  
    • Field Detail

      • values

        protected final java.lang.String[] values
    • Constructor Detail

      • TraceAttributes

        protected TraceAttributes()
      • TraceAttributes

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

      • 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)