Package com.hivemq.client.util
Class TypeSwitch.Default<T>
java.lang.Object
com.hivemq.client.util.TypeSwitch.Default<T>
- All Implemented Interfaces:
TypeSwitch<T>
- Enclosing interface:
TypeSwitch<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.hivemq.client.util.TypeSwitch
TypeSwitch.Default<T>, TypeSwitch.Never -
Method Summary
-
Method Details
-
is
@NotNull public <I extends T> @NotNull TypeSwitch<T> is(@NotNull @NotNull Class<I> type, @NotNull @NotNull Consumer<I> consumer) Description copied from interface:TypeSwitchChecks if the object that is switched over is of a given type and if so executes a callback.If the type matches the returned TypeSwitch will not match any further type.
- Specified by:
isin interfaceTypeSwitch<T>- Type Parameters:
I- the type to check- Parameters:
type- the class of the type to check.consumer- the callback to execute if the type matches.- Returns:
- the TypeSwitch object.
-