Interface SortingType<T>

Type Parameters:
T - Type of parameter to compare
All Superinterfaces:
Comparator<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SortingType<T> extends Comparator<T>
Represents a Sorting Type for organizing a list of specific items.
  • Field Details

    • ECONOMY_NAME_ASCENDING

      static final SortingType<Economy> ECONOMY_NAME_ASCENDING
      Sorts an economy by its name in ascending order.
    • ECONOMY_NAME_DESCENDING

      static final SortingType<Economy> ECONOMY_NAME_DESCENDING
      Sorts an economy by its name in descending order.
    • ECONOMY_NATURAL_CAUSES

      static final SortingType<Economy> ECONOMY_NATURAL_CAUSES
      Sorts an economy by whether it has natural causes.
    • BUSINESS_NAME_ASCENDING

      static final SortingType<Business> BUSINESS_NAME_ASCENDING
      Sorts a business by its name in ascending order.
    • BUSINESS_NAME_DESCENDING

      static final SortingType<Business> BUSINESS_NAME_DESCENDING
      Sorts a business by its name in descending order.
    • BUSINESS_CREATION_DATE_ASCENDING

      static final SortingType<Business> BUSINESS_CREATION_DATE_ASCENDING
      Sorts a business by its creation date in ascending order.
    • BUSINESS_CREATION_DATE_DESCENDING

      static final SortingType<Business> BUSINESS_CREATION_DATE_DESCENDING
      Sorts a business by its creation date in descending order.
    • PRODUCT_NAME_ASCENDING

      static final SortingType<BusinessProduct> PRODUCT_NAME_ASCENDING
      Sorts a product by its name in ascending order.
    • PRODUCT_NAME_DESCENDING

      static final SortingType<BusinessProduct> PRODUCT_NAME_DESCENDING
      Sorts a product by its name in descending order.
    • PRODUCT_PRICE_ASCENDING

      static final SortingType<BusinessProduct> PRODUCT_PRICE_ASCENDING
      Sorts a product by its price in ascending order.
    • PRODUCT_PRICE_DESCENDING

      static final SortingType<BusinessProduct> PRODUCT_PRICE_DESCENDING
      Sorts a product by its price in descending order.
    • PRODUCT_STOCK_ASCENDING

      static final SortingType<BusinessProduct> PRODUCT_STOCK_ASCENDING
      Sorts a business product by its stock in ascending order.
    • PRODUCT_STOCK_DESCENDING

      static final SortingType<BusinessProduct> PRODUCT_STOCK_DESCENDING
      Sorts a business product by its stock in descending order.
    • PRODUCT_POPULARITY_ASCENDING

      static final SortingType<BusinessProduct> PRODUCT_POPULARITY_ASCENDING
      Sorts a business product by its purchase popularity in ascending order.
    • PRODUCT_POPULARITY_DESCENDING

      static final SortingType<BusinessProduct> PRODUCT_POPULARITY_DESCENDING
      Sorts a business product by its purchase popularity in descending order.
    • CORPORATION_INVITE_DATE_ASCENDING

      static final SortingType<CorporationInvite> CORPORATION_INVITE_DATE_ASCENDING
      Sorts a corporation invite by its date in ascending order.
    • CORPORATION_INVITE_DATE_DESCENDING

      static final SortingType<CorporationInvite> CORPORATION_INVITE_DATE_DESCENDING
      Sorts a corporation invite by its date in descending order.
    • CORPORATION_INVITE_CORPORATION_ASCENDING

      static final SortingType<CorporationInvite> CORPORATION_INVITE_CORPORATION_ASCENDING
      Sorts a corporation invite by who it's from in ascending order.
    • CORPORATION_INVITE_CORPORATION_DESCENDING

      static final SortingType<CorporationInvite> CORPORATION_INVITE_CORPORATION_DESCENDING
      Sorts a corporation invite by who it's from in descending order.
    • MATERIAL_TYPE_ASCENDING

      static final SortingType<Material> MATERIAL_TYPE_ASCENDING
      Sorts a material by its type in ascending order.
    • MATERIAL_TYPE_DESCENDING

      static final SortingType<Material> MATERIAL_TYPE_DESCENDING
      Sorts a material by its type in descending order.
    • MATERIAL_NAME_ASCENDING

      static final SortingType<Material> MATERIAL_NAME_ASCENDING
      Sorts a material by its name in ascending order.
    • MATERIAL_NAME_DESCENDING

      static final SortingType<Material> MATERIAL_NAME_DESCENDING
      Sorts a material by its name in descending order.
    • MATERIAL_MAX_STACK_SIZE_ASCENDING

      static final SortingType<Material> MATERIAL_MAX_STACK_SIZE_ASCENDING
      Sorts a material by its maximum stack size in ascending order.
    • MATERIAL_MAX_STACK_SIZE_DESCENDING

      static final SortingType<Material> MATERIAL_MAX_STACK_SIZE_DESCENDING
      Sorts a material by its maximum stack size in descending order.
    • MATERIAL_BLOCKS

      static final SortingType<Material> MATERIAL_BLOCKS
      Sorts a material by whether it is a block.
    • MATERIAL_NONBLOCKS

      static final SortingType<Material> MATERIAL_NONBLOCKS
      Sorts a material by whether it is not a block.
    • MATERIAL_EDIBLES

      static final SortingType<Material> MATERIAL_EDIBLES
      Sorts a material by whether it is edible.
  • Method Details

    • reversed

      default SortingType<T> reversed()
      Specified by:
      reversed in interface Comparator<T>
    • thenComparing

      default SortingType<T> thenComparing(Comparator<? super T> other)
      Specified by:
      thenComparing in interface Comparator<T>
    • values

      @NotNull static @NotNull SortingType<?>[] values()
      Fetches all SortingType values.
      Returns:
      SortingType values
    • values

      @NotNull static <T> @NotNull SortingType<T>[] values(@NotNull @NotNull Class<T> clazz)
      Fetches all SortingType values of a specific type.
      Type Parameters:
      T - Type of SortingType
      Parameters:
      clazz - Type of SortingType
      Returns:
      SortingType values