StringDictionary (Apache OpenNLP :: Ext :: UIMA Annotators 3.0.0-M4 API)
Description: declaration: package: opennlp.uima.normalizer, class: StringDictionary

Package opennlp.uima.normalizer

# Class StringDictionary

java.lang.Object
opennlp.uima.normalizer.StringDictionary

public class StringDictionary extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringDictionary()`
  `StringDictionary(InputStream in)`
  Initializes `StringDictionary` via a specified `InputStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `get(opennlp.tools.util.StringList key)`
  Retrieves a value from a dictionary via its `key`.
  `void`
  `put(opennlp.tools.util.StringList key, String value)`
  Adds a new entry to the dictionary.
  `void`
  `serialize(OutputStream out)`
  Writes the dictionary to the given `OutputStream`.

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

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

- ## Constructor Details

  - ### StringDictionary

    public StringDictionary()

  - ### StringDictionary

    public StringDictionary(InputStream in) throws IOException
    Initializes `StringDictionary` via a specified `InputStream`.
    Parameters:
      `in` - A valid, open `InputStream` to initialize with.
    Throws:
      `IOException` - Thrown if IO errors occurred.

- ## Method Details

  - ### get

    public String get(opennlp.tools.util.StringList key)
    Retrieves a value from a dictionary via its `key`.
    Parameters:
      `key` - The `key` to get value with.
    Returns:
      Retrieves a corresponding String value or `null` if not found.

  - ### put

    public void put(opennlp.tools.util.StringList key, String value)
    Adds a new entry to the dictionary.
    Parameters:
      `key` - The `key` under which to put the `value`.
      `value` - The value to put.

  - ### serialize

    public void serialize(OutputStream out) throws IOException
    Writes the dictionary to the given `OutputStream`.
    Parameters:
      `out` - A valid, open `OutputStream` to serialize to.
    Throws:
      `IOException` - Thrown if IO errors occurred during serialization.