getWordSet

Reads lines from a Reader and adds every non-blank line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

the given CharArraySet with the reader's words

Parameters

reader

Reader containing the wordlist

result

the CharArraySet to fill with the readers words


Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

An unmodifiable CharArraySet with the reader's words

Parameters

reader

Reader containing the wordlist


Reads lines from an InputStream with UTF-8 charset and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

An unmodifiable CharArraySet with the reader's words

Parameters

stream

InputStream containing the wordlist


fun getWordSet(stream: InputStream, charset: Charset): CharArraySet

Reads lines from an InputStream with the given charset and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

An unmodifiable CharArraySet with the reader's words

Parameters

stream

InputStream containing the wordlist

charset

Charset of the wordlist


fun getWordSet(reader: Reader, comment: String, result: CharArraySet): CharArraySet

Reads lines from a Reader and adds every non-blank non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

the given CharArraySet with the reader's words

Parameters

reader

Reader containing the wordlist

comment

The string representing a comment.

result

the CharArraySet to fill with the readers words


fun getWordSet(reader: Reader, comment: String): CharArraySet

Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

An unmodifiable CharArraySet with the reader's words

Parameters

reader

Reader containing the wordlist

comment

The string representing a comment.


fun getWordSet(stream: InputStream, comment: String): CharArraySet

Reads lines from an InputStream with UTF-8 charset and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

An unmodifiable CharArraySet with the reader's words

Parameters

stream

InputStream in UTF-8 encoding containing the wordlist

comment

The string representing a comment.


fun getWordSet(stream: InputStream, charset: Charset, comment: String): CharArraySet

Reads lines from an InputStream with the given charset and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Return

An unmodifiable CharArraySet with the reader's words

Parameters

stream

InputStream containing the wordlist

charset

Charset of the wordlist

comment

The string representing a comment.