Class DslExtensionState<R>
- java.lang.Object
-
- org.hibernate.search.engine.common.dsl.spi.DslExtensionState<R>
-
- Type Parameters:
R
- The result type to expect from functions applied to extended contexts.
public final class DslExtensionState<R> extends Object
A utility class holding the state of the extension contexts found in several DSLs.
-
-
Constructor Summary
Constructors Constructor Description DslExtensionState()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <E> void
ifSupported(Object extension, Optional<E> extendedContextOptional, Function<E,? extends R> extendedContextFunction)
<T> R
orElse(T defaultContext, Consumer<T> defaultContextConsumer)
<T> R
orElse(T defaultContext, Function<T,? extends R> defaultContextFunction)
R
orElseFail()
static <E> E
returnIfSupported(Object extension, Optional<E> extendedContextOptional)
-
-
-
Method Detail
-
returnIfSupported
public static <E> E returnIfSupported(Object extension, Optional<E> extendedContextOptional)
-
ifSupported
public <E> void ifSupported(Object extension, Optional<E> extendedContextOptional, Function<E,? extends R> extendedContextFunction)
-
orElseFail
public R orElseFail()
-
-