public class Letter extends Object
Constructor and Description |
---|
Letter(char character)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
char |
getCharacter()
Returns the character.
|
double |
getProbability()
Returns the probability of the character.
|
int |
hashCode() |
Letter |
probability(double newProbability)
Sets the probability of the character.
|
void |
setProbability(double probability)
Sets the probability of the character.
|
String |
toString() |
public Letter(char character)
character
- characterpublic char getCharacter()
public double getProbability()
public Letter probability(double newProbability)
newProbability
- probabilitypublic void setProbability(double probability)
probability
- probabilityCopyright © 2020. All rights reserved.