com.aspose.omr

## Class StringDictionary

- java.lang.Object
- - com.aspose.omr.StringDictionary

- All Implemented Interfaces:
    Map<String,String>

      public class StringDictionary
      extends Object
      implements Map<String,String>

  A dictionary that maps string keys to string values. Keys are not case-sensitive.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringDictionary()` Instantiates a new instance of a `StringDictionary`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears this dictionary so that it contains no keys.
    `boolean` | `containsKey(Object key)` Tests if the specified object is a key in this dictionary.
    `boolean` | `containsKey(String key)` Tests if the specified object is a key in this dictionary.
    `boolean` | `containsValue(Object value)` Returns true if this dictionary maps one or more keys to this value.
    `boolean` | `containsValue(String value)` Returns true if this dictionary maps one or more keys to this value.
    `Set<Map.Entry<String,String>>` | `entrySet()` Returns a `Set` view of the mappings contained in this map.
    `String` | `get(Object key)` Returns the value to which the specified key is mapped, or `null` if this map contains no mapping for the key.
    `boolean` | `isEmpty()` Tests if this dictionary maps no keys to values.
    `Set<String>` | `keySet()` Returns a `Set` view of the keys contained in this map.
    `String` | `put(String key, String value)` Maps the specified `key` to the specified `value` in this dictionary.
    `void` | `putAll(Map<? extends String,? extends String> t)` Copies all of the mappings from the specified map to this dictionary.
    `String` | `remove(Object key)` Removes the key (and its corresponding value) from this dictionary.
    `int` | `size()` Returns the number of keys in this dictionary.
    `Collection<String>` | `values()` Returns a `Collection` view of the values contained in this map.

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

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

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### StringDictionary

          public StringDictionary()

      Instantiates a new instance of a `StringDictionary`.

  - ### Method Detail

    - #### clear

          public void clear()

      Clears this dictionary so that it contains no keys.
      Specified by:
        `clear` in interface `Map<String,String>`

    - #### containsKey

          public boolean containsKey(Object key)

      Tests if the specified object is a key in this dictionary.
      Specified by:
        `containsKey` in interface `Map<String,String>`
      Parameters:
        `key` - possible key
      Returns:
        `true` if and only if the specified object is a key in this dictionary, as determined by the `equals` method; `false` otherwise.

    - #### containsKey

          public boolean containsKey(String key)

      Tests if the specified object is a key in this dictionary.
      Parameters:
        `key` - possible key
      Returns:
        `true` if and only if the specified object is a key in this dictionary, as determined by the `equals` method; `false` otherwise.
      Throws:
        `IllegalArgumentException` - if the key is `null`

    - #### containsValue

          public boolean containsValue(Object value)

      Returns true if this dictionary maps one or more keys to this value.
      Specified by:
        `containsValue` in interface `Map<String,String>`
      Parameters:
        `value` - value whose presence in this dictionary is to be tested
      Returns:
        `true` if this map maps one or more keys to the specified value
      Throws:
        `IllegalArgumentException` - if the value is `null`

    - #### containsValue

          public boolean containsValue(String value)

      Returns true if this dictionary maps one or more keys to this value.
      Parameters:
        `value` - value whose presence in this dictionary is to be tested
      Returns:
        `true` if this map maps one or more keys to the specified value
      Throws:
        `IllegalArgumentException` - if the value is `null`

    - #### entrySet

          public Set<Map.Entry<String,String>> entrySet()

      Returns a `Set` view of the mappings contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own `remove` operation, or through the `setValue` operation on a map entry returned by the iterator) the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the `Iterator.remove`, `Set.remove`, `removeAll`, `retainAll` and `clear` operations. It does not support the `add` or `addAll` operations.
      Specified by:
        `entrySet` in interface `Map<String,String>`
      Returns:
        a set view of the mappings contained in this map

    - #### get

          public String get(Object key)

      Returns the value to which the specified key is mapped, or `null` if this map contains no mapping for the key.
      Specified by:
        `get` in interface `Map<String,String>`
      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:
        `IllegalArgumentException` - if the specified key is not an instance of String or null

    - #### isEmpty

          public boolean isEmpty()

      Tests if this dictionary maps no keys to values.
      Specified by:
        `isEmpty` in interface `Map<String,String>`
      Returns:
        `true` if this dictionary maps no keys to values; `false` otherwise.

    - #### keySet

          public Set<String> keySet()

      Returns a `Set` view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own `remove` operation), the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the `Iterator.remove`, `Set.remove`, `removeAll`, `retainAll`, and `clear` operations. It does not support the `add` or `addAll` operations.
      Specified by:
        `keySet` in interface `Map<String,String>`
      Returns:
        a set view of the keys contained in this map

    - #### put

          public String put(String key,
                   String value)

      Maps the specified `key` to the specified `value` in this dictionary. Neither the key nor the value can be `null`.

      The value can be retrieved by calling the `get` method with a key that is equal to the original key.

      Specified by:
        `put` in interface `Map<String,String>`
      Parameters:
        `key` - the dictionary key
        `value` - the value
      Returns:
        the previous value of the specified key in this dictionary, or `null` if it did not have one
      Throws:
        `IllegalArgumentException` - if the key or value is `null`

    - #### putAll

          public void putAll(Map<? extends String,? extends String> t)

      Copies all of the mappings from the specified map to this dictionary. These mappings will replace any mappings that this dictionary had for any of the keys currently in the specified map.
      Specified by:
        `putAll` in interface `Map<String,String>`
      Parameters:
        `t` - mappings to be stored in this map
      Throws:
        `IllegalArgumentException` - if the specified map is null

    - #### remove

          public String remove(Object key)

      Removes the key (and its corresponding value) from this dictionary. This method does nothing if the key is not in the dictionary.
      Specified by:
        `remove` in interface `Map<String,String>`
      Parameters:
        `key` - the key that needs to be removed
      Returns:
        the value to which the key had been mapped in this dictionary, or `null` if the key did not have a mapping
      Throws:
        `IllegalArgumentException` - if the key is not an instance of String or is `null`

    - #### size

          public int size()

      Returns the number of keys in this dictionary.
      Specified by:
        `size` in interface `Map<String,String>`
      Returns:
        the number of keys in this dictionary.

    - #### values

          public Collection<String> values()

      Returns a `Collection` view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. If the map is modified while an iteration over the collection is in progress (except through the iterator's own `remove` operation), the results of the iteration are undefined. The collection supports element removal, which removes the corresponding mapping from the map, via the `Iterator.remove`, `Collection.remove`, `removeAll`, `retainAll` and `clear` operations. It does not support the `add` or `addAll` operations.
      Specified by:
        `values` in interface `Map<String,String>`
      Returns:
        a collection view of the values contained in this map

Copyright © 2014. All rights reserved.