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

BundledDictionary

class BundledDictionary : Dictionary

A Dictionary of which the underlying file is a resource in the JAR.

Properties

filename

val filename: String

the path to the resource 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, BundledDictionary>

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

EXTENDED_DICTIONARY

const val EXTENDED_DICTIONARY: String

The location of an extended English dictionary.

SIMPLE_DICTIONARY

const val SIMPLE_DICTIONARY: String

The location of a simple English dictionary.