R
- The result type to expect from functions applied to extended contexts.public final class DslExtensionState<R> extends Object
Constructor and Description |
---|
DslExtensionState() |
Modifier and Type | Method and Description |
---|---|
<E> void |
ifSupported(Object extension,
Optional<E> extendedContextOptional,
Consumer<E> extendedContextConsumer) |
<E> void |
ifSupported(Object extension,
Optional<E> extendedContextOptional,
Function<E,R> extendedContextFunction) |
<T> R |
orElse(T defaultContext,
Consumer<T> defaultContextConsumer) |
<T> R |
orElse(T defaultContext,
Function<T,R> defaultContextFunction) |
R |
orElseFail() |
static <E> E |
returnIfSupported(Object extension,
Optional<E> extendedContextOptional) |
public static <E> E returnIfSupported(Object extension, Optional<E> extendedContextOptional)
public <E> void ifSupported(Object extension, Optional<E> extendedContextOptional, Consumer<E> extendedContextConsumer)
public <E> void ifSupported(Object extension, Optional<E> extendedContextOptional, Function<E,R> extendedContextFunction)
public R orElseFail()
Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.