Enum Class FilterGroupBy

java.lang.Object
java.lang.Enum<FilterGroupBy>
io.github.thecsdev.betterstats.api.util.enumerations.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:
  • Enum Constant Details

    • DEFAULT

      public static final FilterGroupBy DEFAULT
      The default grouping method, decided by the StatsTab.
    • ALL

      public static final FilterGroupBy ALL
      Group all statistics entries into one single group.
    • MOD

      public static final FilterGroupBy MOD
      Group statistics entries based on the mod the entry's item belongs to.
  • Method Details

    • values

      public static FilterGroupBy[] 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

      public static FilterGroupBy valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getText

      public final net.minecraft.text.Text getText()
      Specified by:
      getText in interface io.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 of SUStats using this FilterGroupBy.
      Parameters:
      stats - The SUStats to group.
      typeClassGetter - Generic type getter. Leave this empty. Do not pass any arguments.
      Throws:
      NullPointerException - If an argument is null.