Class CharArraySpanMap

java.lang.Object
org.apache.uima.internal.util.CharArraySpanMap

public class CharArraySpanMap extends Object
A map from subsequences of a character array to objects.
  • Constructor Details

    • CharArraySpanMap

      public CharArraySpanMap()
      Default constructor.
    • CharArraySpanMap

      public CharArraySpanMap(int initialArraySize)
      Constructor with initial array size argument.
      Parameters:
      initialArraySize - Initial array size.
    • CharArraySpanMap

      public CharArraySpanMap(int initialArraySize, int initialMapSize)
      Constructor.
      Parameters:
      initialArraySize - Initial array size.
      initialMapSize - Initial map size.
  • Method Details

    • put

      public void put(String s, Object value)
      Add a key-value pair to the map.
      Parameters:
      s - The key (will be copied).
      value - The value.
    • containsKey

      public final boolean containsKey(char[] characterArray, int start, int length)
      Check if sub-range of character array is a key.
      Parameters:
      characterArray - Array that contains the potential key chars.
      start - Start of sub-range.
      length - Length of sub-range.
      Returns:
      true iff the map contains the key.
    • get

      public final Object get(char[] characterArray, int start, int length)