Package us.teaminceptus.novaconomy.api
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.
Represents a Sorting Type for organizing a list of specific items.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SortingType<Business>Sorts a business by its creation date in ascending order.static final SortingType<Business>Sorts a business by its creation date in descending order.static final SortingType<Business>Sorts a business by its name in ascending order.static final SortingType<Business>Sorts a business by its name in descending order.static final SortingType<CorporationInvite>Sorts a corporation invite by who it's from in ascending order.static final SortingType<CorporationInvite>Sorts a corporation invite by who it's from in descending order.static final SortingType<CorporationInvite>Sorts a corporation invite by its date in ascending order.static final SortingType<CorporationInvite>Sorts a corporation invite by its date in descending order.static final SortingType<Economy>Sorts an economy by its name in ascending order.static final SortingType<Economy>Sorts an economy by its name in descending order.static final SortingType<Economy>Sorts an economy by whether it has natural causes.static final SortingType<Material>Sorts a material by whether it is a block.static final SortingType<Material>Sorts a material by whether it is edible.static final SortingType<Material>Sorts a material by its maximum stack size in ascending order.static final SortingType<Material>Sorts a material by its maximum stack size in descending order.static final SortingType<Material>Sorts a material by its name in ascending order.static final SortingType<Material>Sorts a material by its name in descending order.static final SortingType<Material>Sorts a material by whether it is not a block.static final SortingType<Material>Sorts a material by its type in ascending order.static final SortingType<Material>Sorts a material by its type in descending order.static final SortingType<BusinessProduct>Sorts a product by its name in ascending order.static final SortingType<BusinessProduct>Sorts a product by its name in descending order.static final SortingType<BusinessProduct>Sorts a business product by its purchase popularity in ascending order.static final SortingType<BusinessProduct>Sorts a business product by its purchase popularity in descending order.static final SortingType<BusinessProduct>Sorts a product by its price in ascending order.static final SortingType<BusinessProduct>Sorts a product by its price in descending order.static final SortingType<BusinessProduct>Sorts a business product by its stock in ascending order.static final SortingType<BusinessProduct>Sorts a business product by its stock in descending order. -
Method Summary
Modifier and TypeMethodDescriptiondefault SortingType<T>reversed()default SortingType<T>thenComparing(Comparator<? super T> other) static @NotNull SortingType<?>[]values()Fetches all SortingType values.static <T> @NotNull SortingType<T>[]Fetches all SortingType values of a specific type.Methods inherited from interface java.util.Comparator
compare, equals, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
ECONOMY_NAME_ASCENDING
Sorts an economy by its name in ascending order. -
ECONOMY_NAME_DESCENDING
Sorts an economy by its name in descending order. -
ECONOMY_NATURAL_CAUSES
Sorts an economy by whether it has natural causes. -
BUSINESS_NAME_ASCENDING
Sorts a business by its name in ascending order. -
BUSINESS_NAME_DESCENDING
Sorts a business by its name in descending order. -
BUSINESS_CREATION_DATE_ASCENDING
Sorts a business by its creation date in ascending order. -
BUSINESS_CREATION_DATE_DESCENDING
Sorts a business by its creation date in descending order. -
PRODUCT_NAME_ASCENDING
Sorts a product by its name in ascending order. -
PRODUCT_NAME_DESCENDING
Sorts a product by its name in descending order. -
PRODUCT_PRICE_ASCENDING
Sorts a product by its price in ascending order. -
PRODUCT_PRICE_DESCENDING
Sorts a product by its price in descending order. -
PRODUCT_STOCK_ASCENDING
Sorts a business product by its stock in ascending order. -
PRODUCT_STOCK_DESCENDING
Sorts a business product by its stock in descending order. -
PRODUCT_POPULARITY_ASCENDING
Sorts a business product by its purchase popularity in ascending order. -
PRODUCT_POPULARITY_DESCENDING
Sorts a business product by its purchase popularity in descending order. -
CORPORATION_INVITE_DATE_ASCENDING
Sorts a corporation invite by its date in ascending order. -
CORPORATION_INVITE_DATE_DESCENDING
Sorts a corporation invite by its date in descending order. -
CORPORATION_INVITE_CORPORATION_ASCENDING
Sorts a corporation invite by who it's from in ascending order. -
CORPORATION_INVITE_CORPORATION_DESCENDING
Sorts a corporation invite by who it's from in descending order. -
MATERIAL_TYPE_ASCENDING
Sorts a material by its type in ascending order. -
MATERIAL_TYPE_DESCENDING
Sorts a material by its type in descending order. -
MATERIAL_NAME_ASCENDING
Sorts a material by its name in ascending order. -
MATERIAL_NAME_DESCENDING
Sorts a material by its name in descending order. -
MATERIAL_MAX_STACK_SIZE_ASCENDING
Sorts a material by its maximum stack size in ascending order. -
MATERIAL_MAX_STACK_SIZE_DESCENDING
Sorts a material by its maximum stack size in descending order. -
MATERIAL_BLOCKS
Sorts a material by whether it is a block. -
MATERIAL_NONBLOCKS
Sorts a material by whether it is not a block. -
MATERIAL_EDIBLES
Sorts a material by whether it is edible.
-
-
Method Details
-
reversed
- Specified by:
reversedin interfaceComparator<T>
-
thenComparing
- Specified by:
thenComparingin interfaceComparator<T>
-
values
Fetches all SortingType values.- Returns:
- SortingType values
-
values
Fetches all SortingType values of a specific type.- Type Parameters:
T- Type of SortingType- Parameters:
clazz- Type of SortingType- Returns:
- SortingType values
-