Interface SearchSortFactoryExtensionIfSupportedStep
-
- All Known Subinterfaces:
SearchSortFactoryExtensionIfSupportedMoreStep
public interface SearchSortFactoryExtensionIfSupportedStep
The initial step when attempting to apply multiple extensions to aSearchSortFactory
.- See Also:
SearchSortFactory.extension()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> SearchSortFactoryExtensionIfSupportedMoreStep
ifSupported(SearchSortFactoryExtension<T> extension, Function<T,? extends SortFinalStep> sortContributor)
If the given extension is supported, and none of the previous extensions passed toifSupported(SearchSortFactoryExtension, Function)
was supported, extend the current factory with this extension, apply the given function to the extended factory, and store the resulting sort for later retrieval.
-
-
-
Method Detail
-
ifSupported
<T> SearchSortFactoryExtensionIfSupportedMoreStep ifSupported(SearchSortFactoryExtension<T> extension, Function<T,? extends SortFinalStep> sortContributor)
If the given extension is supported, and none of the previous extensions passed toifSupported(SearchSortFactoryExtension, Function)
was supported, extend the current factory with this extension, apply the given function to the extended factory, and store the resulting sort for later retrieval.This method cannot be called after
SearchSortFactoryExtensionIfSupportedMoreStep.orElse(Function)
orSearchSortFactoryExtensionIfSupportedMoreStep.orElseFail()
.- Type Parameters:
T
- The type of the extended factory.- Parameters:
extension
- The extension to apply.sortContributor
- A function called if the extension is successfully applied; it will use the (extended) sort factory passed in parameter to create a sort, returning the final step in the sort DSL. Should generally be a lambda expression.- Returns:
this
, for method chaining.
-
-