public class DefaultWordGeneratorConfig extends Object implements WordGeneratorConfig
WordGeneratorConfig
that you can fill using
addLetters(Letter...)
and removeLetters(Letter...)
.Constructor and Description |
---|
DefaultWordGeneratorConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addLetters(Letter... addedLetters)
Adds some letters that will be returned via
getSupportedCharacters() and
getProbability(char) . |
boolean |
equals(Object obj) |
Letter[] |
getLetters()
Returns the letters that will be returned via
getSupportedCharacters() and
getProbability(char) . |
double |
getProbability(char c)
Returns the probability for a specific character that got returned via
WordGeneratorConfig.getSupportedCharacters() . |
double |
getStandardWordLength()
Returns the standard word length.
|
char[] |
getSupportedCharacters()
Returns the supported lower case characters.
|
int |
hashCode() |
DefaultWordGeneratorConfig |
letters(Letter... newSupportedLetters)
Sets the letters that will be returned via
getSupportedCharacters() and
getProbability(char) . |
void |
removeLetters(Letter... removedLetters)
Removes some letters that will not be returned via
getSupportedCharacters() and getProbability(char) any longer. |
void |
setStandardWordLength(double standardWordLength)
Sets the standard word length.
|
void |
setSupportedLetters(Letter... supportedLetters)
Sets the letters that will be returned via
getSupportedCharacters() and
getProbability(char) . |
DefaultWordGeneratorConfig |
standardWordLength(double newStandardWordLength)
Sets the standard word length.
|
String |
toString() |
public double getProbability(char c)
WordGeneratorConfig
WordGeneratorConfig.getSupportedCharacters()
.getProbability
in interface WordGeneratorConfig
c
- a supported characterpublic char[] getSupportedCharacters()
WordGeneratorConfig
getSupportedCharacters
in interface WordGeneratorConfig
public void addLetters(Letter... addedLetters)
getSupportedCharacters()
and
getProbability(char)
.addedLetters
- supported letterspublic void removeLetters(Letter... removedLetters)
getSupportedCharacters()
and getProbability(char)
any longer.removedLetters
- supported letterspublic Letter[] getLetters()
getSupportedCharacters()
and
getProbability(char)
.public DefaultWordGeneratorConfig letters(Letter... newSupportedLetters)
getSupportedCharacters()
and
getProbability(char)
.newSupportedLetters
- supported letterspublic void setSupportedLetters(Letter... supportedLetters)
getSupportedCharacters()
and
getProbability(char)
.supportedLetters
- supported letterspublic double getStandardWordLength()
WordGeneratorConfig
getStandardWordLength
in interface WordGeneratorConfig
public DefaultWordGeneratorConfig standardWordLength(double newStandardWordLength)
newStandardWordLength
- the word lengthpublic void setStandardWordLength(double standardWordLength)
standardWordLength
- the word lengthCopyright © 2020. All rights reserved.