Package com.teamdev.jxbrowser.spellcheck
Interface Dictionary
public interface Dictionary
Provides functionality for working with a spell check dictionary.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the givenwordto the dictionary and schedules a write to disk.booleanReturnstrueif the dictionary contains the givenword.booleanRemoves the givenwordfrom the dictionary and schedules a write to disk.words()Returns the words in the current dictionary or an empty collection if the dictionary does not have any word.
-
Method Details
-
words
Collection<String> words()Returns the words in the current dictionary or an empty collection if the dictionary does not have any word.- Throws:
ObjectClosedException- when the engine is closed
-
add
Adds the givenwordto the dictionary and schedules a write to disk.- Parameters:
word- a word to add to the dictionary. It must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace- Returns:
trueif the givenwordis valid and not a duplicate- Throws:
IllegalArgumentException- whenwordis empty or blankObjectClosedException- when the engine is closed
-
remove
Removes the givenwordfrom the dictionary and schedules a write to disk.- Parameters:
word- a word to remove from the dictionary. It must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace- Returns:
trueif the givenwordwas found and removed successfully- Throws:
IllegalArgumentException- whenwordis empty or blankObjectClosedException- when the engine is closed
-
has
Returnstrueif the dictionary contains the givenword.- Parameters:
word- a word to check. It must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace- Throws:
IllegalArgumentException- whenwordis empty or blankObjectClosedException- when the engine is closed
-