Klasse CharIntMap

java.lang.Object
libsidutils.stringsearch.CharIntMap
Alle implementierten Schnittstellen:
Externalizable, Serializable, Cloneable

class CharIntMap extends Object implements Externalizable, Cloneable
The CharIntMap is a collection to save char to int mappings in. The CharIntMap is destined to provide fast access to skip tables while being both Unicode-safe and more RAM-effective than a naive int array.

The CharIntMap is initialized by specifying the extent between the lowest and the highest occuring character and the lowest occuring character. Only an array of size highest - lowest + 1 is constructed.

There's usually no need to construct a CharIntMap yourself, it is done automatically for you in the pre-processing methods.
Version:
1.2
Autor:
Johann Burkard
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    private int[]
     
    private int
     
    private char
     
    (Package privat) static final long
     
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Constructor for CharIntMap.
    CharIntMap(int extent, char lowest)
    Constructor for CharIntMap.
    CharIntMap(int extent, char lowest, int defaultValue)
    Constructor for CharIntMap.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    Returns a deep clone of this CharIntMap.
    boolean
    Returns if this Object is equal to another Object.
    int
    get(char c)
    Returns the stored value for the given char.
    int
    Returns the extent of the actual char array.
    char
    Returns the highest char that mappings can be saved for.
    char
    Returns the lowest char that mappings can be saved for.
    int
    Returns the hashCode of this Object.
    void
     
    void
    set(char c, int val)
    Sets the stored value for the given char.
    Returns a String representation of this Object.
    void
     

    Von Klasse geerbte Methoden java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Felddetails

    • serialVersionUID

      static final long serialVersionUID
      Siehe auch:
    • array

      private int[] array
    • lowest

      private char lowest
    • defaultValue

      private int defaultValue
  • Konstruktordetails

    • CharIntMap

      public CharIntMap()
      Constructor for CharIntMap. Required for Serialization.
    • CharIntMap

      public CharIntMap(int extent, char lowest)
      Constructor for CharIntMap.
      Parameter:
      extent - the extent of the text
      lowest - the lowest occuring character
    • CharIntMap

      public CharIntMap(int extent, char lowest, int defaultValue)
      Constructor for CharIntMap.
      Parameter:
      extent - the extent of the text
      lowest - the lowest occuring character
      defaultValue - a default value to initialize the underlying int array with
  • Methodendetails