public abstract class CriterionSet<T extends Criterion> extends Object implements Iterable<Map.Entry<T,Value<?>>>
Criterion-Values pairs. Provides methods for
the administration of these pairs.| Constructor and Description |
|---|
CriterionSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(CriterionSet<T> criterionSet)
Adds all Criterions with the specified value specified in
criterionSet. |
void |
add(T criterion,
double value)
Adds the Criterion with the specified double value.
|
void |
add(T criterion,
int value)
Adds the Criterion with the specified integer value.
|
void |
add(T criterion,
Value<?> value)
Adds the Criterion with the specified value.
|
abstract double[] |
array()
Returns an array of all CriterionSet values.
|
double |
distance(CriterionSet<T> other)
Calculates the euclidean distance of two
CriterionSets. |
Value<?> |
get(T criterion)
Returns the value that is assigned to the given
Criterion. |
T |
get(Value<?> value)
Returns the Criterion that is assigned to the given value.
|
Collection<T> |
getKeys()
Returns all
Criterions. |
Collection<Value<?>> |
getValues()
Returns all values.
|
boolean |
isEqual(CriterionSet<T> opponent)
Returns
true if this CriterionSet is equal to the specified
CriterionSet. |
Iterator<Map.Entry<T,Value<?>>> |
iterator() |
int |
size()
Returns the number of set
Criterions. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic abstract double[] array()
public int size()
Criterions.Criterionspublic Collection<T> getKeys()
Criterions.Criterionspublic Collection<Value<?>> getValues()
public Value<?> get(T criterion)
Criterion. Returns
null if the Criterion does not exist.criterion - the given criterionpublic T get(Value<?> value)
null if the value does not exist.value - the given valuepublic void add(T criterion, Value<?> value)
criterion - the criterionvalue - the valuepublic void add(T criterion, double value)
criterion - the criterionvalue - the valuepublic void add(T criterion, int value)
criterion - the criterionvalue - the valuepublic void add(CriterionSet<T> criterionSet)
criterionSet.criterionSet - the criterionSetpublic boolean isEqual(CriterionSet<T> opponent)
true if this CriterionSet is equal to the specified
CriterionSet. This comparison is based on the #array() values.opponent - other CriterionSettrue if the CriterionSets are equalpublic double distance(CriterionSet<T> other)
CriterionSets. This
calculation is based on the #array() values.other - the second CriterionSet