public interface SynonymDictionary extends DictionaryBase, Iterable<String>
Learn more
| Modifier and Type | Method and Description |
|---|---|
void |
addRange(Iterable<String[]> synonyms)
Adds the specified collection of synonym groups to this instance of the
SynonymDictionary. |
void |
addRange(String[][] synonyms)
Adds the specified collection of synonym groups to this instance of the
SynonymDictionary. |
void |
clear()
Removes all words from this
SynonymDictionary object. |
String[][] |
getAllSynonymGroups()
Gets all groups of synonyms contained in this dictionary.
|
int |
getCount()
Gets the number of words contained in this
SynonymDictionary. |
String[][] |
getSynonymGroups(String word)
Gets all groups of synonyms to which the specified word belongs.
|
String[] |
getSynonyms(String word)
Gets the synonyms for the specified word.
|
Iterator<String> |
iterator()
Returns an iterator that iterates through the collection.
|
exportDictionary, getDictionaryType, importDictionaryforEach, spliteratorvoid addRange(Iterable<String[]> synonyms)
SynonymDictionary.synonyms - The collection of synonym groups to add to the dictionary.void addRange(String[][] synonyms)
SynonymDictionary.synonyms - The collection of synonym groups to add to the dictionary.void clear()
SynonymDictionary object.clear in interface DictionaryBaseString[][] getAllSynonymGroups()
int getCount()
SynonymDictionary.SynonymDictionary.String[][] getSynonymGroups(String word)
word - The word for getting groups of synonyms.String[] getSynonyms(String word)
word - The word to suggest the synonyms.SynonymDictionary object does not contain the specified word.Copyright © 2026. All rights reserved.