public interface SearchSortFactoryExtensionIfSupportedStep
SearchSortFactory.SearchSortFactory.extension()| Modifier and Type | Method and 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 to
ifSupported(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. |
<T> SearchSortFactoryExtensionIfSupportedMoreStep ifSupported(SearchSortFactoryExtension<T> extension, Function<T,? extends SortFinalStep> sortContributor)
ifSupported(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)
or SearchSortFactoryExtensionIfSupportedMoreStep.orElseFail().
T - The type of the extended factory.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.this, for method chaining.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.