Package org.kingdoms.constants.top
Class ExpressionBasedTopData<K,V>
java.lang.Object
org.kingdoms.constants.top.IndexedTopData<K,V>
org.kingdoms.constants.top.ExpressionBasedTopData<K,V>
- All Implemented Interfaces:
Comparator<V>,TopData<V>
- Direct Known Subclasses:
GroupTopData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceExpressionBasedTopData.Creator<TOP extends ExpressionBasedTopData<?,?>> -
Constructor Summary
ConstructorsConstructorDescriptionExpressionBasedTopData(org.kingdoms.utils.compilers.expressions.MathExpression comparator, org.kingdoms.utils.compilers.expressions.ConditionalExpression filter, String dataName, Messenger displayName, Messenger description) -
Method Summary
Modifier and TypeMethodDescriptionintorg.kingdoms.utils.compilers.expressions.ConditionalExpressionprotected abstract PlaceholderProvidergetPlaceholderProvider(V value) doublegetTopValueOf(V data) booleanisIncluded(V data) static <TOP extends ExpressionBasedTopData<?,?>>
voidparse(ConfigSection section, ExpressionBasedTopData.Creator<TOP> creator, Map<String, TOP> tops) toString()Methods inherited from class org.kingdoms.constants.top.IndexedTopData
createKeyArray, createValueArray, fetchData, getKey, getPositionOf, getTop, getTop, getTopPosition, size, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ExpressionBasedTopData
-
-
Method Details
-
getPlaceholderProvider
-
parse
public static <TOP extends ExpressionBasedTopData<?,?>> void parse(ConfigSection section, ExpressionBasedTopData.Creator<TOP> creator, Map<String, TOP> tops) -
getFilter
public org.kingdoms.utils.compilers.expressions.ConditionalExpression getFilter() -
getPredicate
-
getDisplayName
-
getDescription
-
getDataName
-
isIncluded
- Returns:
- true if this data is included in the leaderboard, otherwise false.
-
getTopValueOf
-
compare
-
toString
-