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

equals

fun equals(other: Any?): Boolean

Returns true iff this dictionary's filename equals other's filename.

hashCode

fun hashCode(): Int

Returns the hash code of the filename.

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.