public class FightResults<T> extends Object
| Constructor and Description |
|---|
FightResults(String label,
boolean separateIndexes) |
| Modifier and Type | Method and Description |
|---|---|
static <K,V extends Comparable<? super V>> |
entriesSortedByValues(Map<K,V> map,
boolean descending)
Sort a map by it's values
|
LinkedHashMap<T,Double> |
getPercentagesDesc() |
List<PlayerResults<T>> |
getResultsAsc() |
void |
saveResult(T[] fighters,
T winner) |
String |
toString() |
String |
toStringMultiLine() |
public FightResults(String label, boolean separateIndexes)
public List<PlayerResults<T>> getResultsAsc()
public LinkedHashMap<T,Double> getPercentagesDesc()
LinkedHashMap ranking all fighters with their associated win percentage with the best performing player firstpublic String toStringMultiLine()
public static <K,V extends Comparable<? super V>> SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map, boolean descending)
map - The map to sortdescending - True to sort in descending order, false to sort in ascending orderCopyright © 2014. All rights reserved.