public class DictionaryBuilder extends Object
| Constructor and Description |
|---|
DictionaryBuilder() |
| Modifier and Type | Method and Description |
|---|---|
DictionaryBuilder |
addWord(String word,
int rank)
Add word to dictionary.
|
Dictionary |
createDictionary()
Creates the dictionary.
|
DictionaryBuilder |
setDictionaryName(String dictionary_name)
Set the dictionary name
|
DictionaryBuilder |
setExclusion(boolean exclusion)
Set if exclusion dictionary or not.
|
public DictionaryBuilder setDictionaryName(String dictionary_name)
dictionary_name - unique name of dictionary.public DictionaryBuilder setExclusion(boolean exclusion)
exclusion - true when desiring to disallow any password contained in this dictionary; false otherwise.public DictionaryBuilder addWord(String word, int rank)
word - key to add to the dictionary, will be lowercased.rank - the rank of the word in the dictionary.
Should increment from most common to least common if ranked.
If unranked, an example would be if there were 500 values in the dictionary, every word should have a rank of 250.
If exclusion dictionary, rank is unimportant (set to 0).public Dictionary createDictionary()
Copyright © 2017. All rights reserved.