Enum Class FilterGroupBy
- All Implemented Interfaces:
io.github.thecsdev.tcdcommons.api.util.interfaces.ITextProvider
,Serializable
,Comparable<FilterGroupBy>
,Constable
public enum FilterGroupBy
extends Enum<FilterGroupBy>
implements io.github.thecsdev.tcdcommons.api.util.interfaces.ITextProvider
A statistics filter
Enum
that dictates how statistics entries are to be grouped.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionGroups a collection ofSUStat
s using thisFilterGroupBy
.final net.minecraft.text.Text
getText()
static FilterGroupBy
Returns the enum constant of this class with the specified name.static FilterGroupBy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The default grouping method, decided by theStatsTab
. -
ALL
Group all statistics entries into one single group. -
MOD
Group statistics entries based on the mod the entry's item belongs to.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getText
public final net.minecraft.text.Text getText()- Specified by:
getText
in interfaceio.github.thecsdev.tcdcommons.api.util.interfaces.ITextProvider
-
apply
@SafeVarargs public final <S extends SUStat<?>> Map<net.minecraft.text.Text,List<S>> apply(Iterable<S> stats, S... typeClassGetter) throws NullPointerException Groups a collection ofSUStat
s using thisFilterGroupBy
.- Parameters:
stats
- TheSUStat
s to group.typeClassGetter
- Generic type getter. Leave this empty. Do not pass any arguments.- Throws:
NullPointerException
- If an argument is null.
-