public class DiscreteValueProcessor
extends java.lang.Object
Constructor and Description |
---|
DiscreteValueProcessor(java.util.List<?> valList)
Creates a valueProcessor containing ranks of and number of bids on a list of values.
|
Modifier and Type | Method and Description |
---|---|
void |
addBidForValue(ValueDiscrete v)
Adds 1 to the bidList for a certain value.
|
void |
decreaseRank(ValueDiscrete v)
Directly decreases the rank of a value.
|
ValueDiscrete |
getHighestRankedValue()
Returns the highest ranked value within an issue
|
double |
getNormalizedValueRank(ValueDiscrete v)
Gets the normalized rank of a certain value.
|
int |
getValueIndex(ValueDiscrete v)
Returns the index of a certain value in the valuelist.
|
int |
getValueRank(ValueDiscrete v)
Gets the rank of a certain value.
|
void |
increaseRank(ValueDiscrete v)
Directly increases the rank of a value.
|
java.lang.String |
toString() |
public DiscreteValueProcessor(java.util.List<?> valList)
valList
- public int getValueIndex(ValueDiscrete v)
v
- The valuepublic int getValueRank(ValueDiscrete v)
v
- The valuepublic double getNormalizedValueRank(ValueDiscrete v)
v
- The valuepublic ValueDiscrete getHighestRankedValue()
public void addBidForValue(ValueDiscrete v)
v
- The value v on which the bid was donepublic void increaseRank(ValueDiscrete v)
v
- The value for which the rank has to be changedpublic void decreaseRank(ValueDiscrete v)
v
- The value for which the rank has to be changedpublic java.lang.String toString()
toString
in class java.lang.Object