T - the generic type used for this leveling functionpublic class LevelingFunction<T> extends Functions<T>
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
LevelingFunction()
constructs a new, empty leveling function caller can use Map-method
putAll to fill this empty leveling function
|
LevelingFunction(PreferenceOrder<T> po)
this constructor creates a leveling function using a given preference
order
|
| Modifier and Type | Method and Description |
|---|---|
PreferenceOrder<T> |
generatePreferenceOrder()
this method returns a preference order made out of this leveling function
|
java.util.Map<T,java.lang.Integer> |
getLevelingFunction()
returns this leveling function
|
RankingFunction<T> |
getRankingFunction()
returns a new RankingFunction based on this LevelingFunction
|
void |
strengthenElement(T element)
strengthens the given element in the leveling function
|
void |
weakenElement(T element)
weakens the given element in the leveling function
|
containsKey, containsValue, get, getElementsByValue, getPredecessors, getSuccessors, toString, valuesclear, clone, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, sizeprivate static final long serialVersionUID
public LevelingFunction()
public LevelingFunction(PreferenceOrder<T> po)
po - the given preference orderpublic java.util.Map<T,java.lang.Integer> getLevelingFunction()
getLevelingFunction in class Functions<T>public RankingFunction<T> getRankingFunction()
public PreferenceOrder<T> generatePreferenceOrder()
generatePreferenceOrder in class Functions<T>public void weakenElement(T element)
weakenElement in class Functions<T>element - the element being weakenedpublic void strengthenElement(T element)
strengthenElement in class Functions<T>element - the element being strengthened