intellij-randomness / com.fwdekker.randomness.word / UserDictionary

UserDictionary

class UserDictionary : Dictionary

A Dictionary of which the underlying file is a regular file.

Properties

filename

val filename: String

the path to the file

words

val words: Set<String>

The words in the dictionary.

Functions

toString

fun toString(): String

Returns a human-readable string of the dictionary's filename.

validate

fun validate(): Unit

Throws an InvalidDictionaryException iff this dictionary is currently invalid.

Inherited Functions

isValid

open fun isValid(): Boolean

Returns true iff validate does not throw an exception.

Companion Object Properties

cache

val cache: Cache<String, UserDictionary>

The cache of bundled dictionaries, used to improve word generation times.