Klasse CharArrayMap<P>

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.util.CharArrayMap<P>
Alle implementierten Schnittstellen:
Cloneable, CharArrayMapper<P>

public final class CharArrayMap<P> extends Object implements CharArrayMapper<P>
This map avoids hashing. This is suitable for few elements or long char arrays because it uses vectorized equals. Vectorized equals is several times faster then calculating hashCode in a loop. This class is not thread safe and callers are responsible for thread safety.
Autor:
jkubitz
  • Konstruktordetails

    • CharArrayMap

      public CharArrayMap()
    • CharArrayMap

      public CharArrayMap(int estimatedSize)
  • Methodendetails

    • values

      public Collection<P> values()
      Beschreibung aus Schnittstelle kopiert: CharArrayMapper
      Returns a copied collection of values.
      Angegeben von:
      values in Schnittstelle CharArrayMapper<P>
      Gibt zurück:
      all values in undefined order. The order is not guaranteed to be stable.
    • keys

      public Collection<char[]> keys()
      Beschreibung aus Schnittstelle kopiert: CharArrayMapper
      Returns a copied collection of keys.
      Angegeben von:
      keys in Schnittstelle CharArrayMapper<P>
      Gibt zurück:
      all keys in undefined order. The order is not guaranteed to be stable.
    • containsKey

      public boolean containsKey(char[] key)
      Angegeben von:
      containsKey in Schnittstelle CharArrayMapper<P>
    • get

      public P get(char[] key)
      Angegeben von:
      get in Schnittstelle CharArrayMapper<P>
    • put

      public P put(char[] key, P value)
      Angegeben von:
      put in Schnittstelle CharArrayMapper<P>
      Gibt zurück:
      the previous value
    • size

      public int size()
      Angegeben von:
      size in Schnittstelle CharArrayMapper<P>
      Gibt zurück:
      the number of keys
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object