Class Attributes
java.lang.Object
opennlp.tools.dictionary.serializer.Attributes
The
Attributes class stores name value pairs.
Problem: If a HashMap is used storing name-value pairs this results
in a very high memory footprint, replace it.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Attributes
public Attributes()
-
-
Method Details
-
getValue
Retrieves the value for the given key ornullif attribute it not set.- Parameters:
key- The key to get the desired value for.- Returns:
- The value for the given key or
null
-
setValue
Sets a key/value pair.- Parameters:
key- The key that uniquely identifies the specifiedvalue. Must not benull.value- The value that shall be retrievable via itskey. Must not benull.
-
iterator
Iterates over the keys.- Returns:
- Retrieves a key-based
Iterator.
-