public class WeightedWord extends java.lang.Object implements WeightedWordInterface
Constructor and Description |
---|
WeightedWord(java.lang.String word,
int value)
Constructs a word with the same value for the size and color
|
WeightedWord(java.lang.String word,
int sizeValue,
int colorValue)
Constructs the word
|
Modifier and Type | Method and Description |
---|---|
int |
getColorValue()
Returns the value for the color
|
float |
getColorWeight()
Returns the colorWeight
|
int |
getSizeValue()
Returns the value for the size
|
float |
getSizeWeight()
Returns the sizeWeight
|
java.lang.String |
getWord()
Returns the String of the word
|
void |
setColorWeight(float colorWeight)
Sets the colorWeight
|
void |
setSizeWeight(float sizeWeight)
Sets the sizeWeight
|
public WeightedWord(java.lang.String word, int value)
word
- the wordvalue
- the value, any positive integerpublic WeightedWord(java.lang.String word, int sizeValue, int colorValue)
word
- the wordsizeValue
- the value for the size weighting, any positive integercolorValue
- the value for the color weighting, any positive integerpublic java.lang.String getWord()
getWord
in interface WeightedWordInterface
public int getSizeValue()
getSizeValue
in interface WeightedWordInterface
public int getColorValue()
getColorValue
in interface WeightedWordInterface
public void setSizeWeight(float sizeWeight)
setSizeWeight
in interface WeightedWordInterface
sizeWeight
- the new sizeWeightpublic float getSizeWeight()
getSizeWeight
in interface WeightedWordInterface
public void setColorWeight(float colorWeight)
setColorWeight
in interface WeightedWordInterface
colorWeight
- the new sizeWeightpublic float getColorWeight()
getColorWeight
in interface WeightedWordInterface