public static class TypeSwitch.Never extends Object implements TypeSwitch<Object>
TypeSwitch.Default<T>, TypeSwitch.Never
Modifier and Type | Method and Description |
---|---|
<I> @NotNull TypeSwitch.Never |
is(@NotNull Class<I> type,
@NotNull Consumer<I> consumer)
Checks if the object that is switched over is of a given type and if so executes a callback.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
never, when
@NotNull public <I> @NotNull TypeSwitch.Never is(@NotNull @NotNull Class<I> type, @NotNull @NotNull Consumer<I> consumer)
TypeSwitch
If the type matches the returned TypeSwitch will not match any further type.
is
in interface TypeSwitch<Object>
I
- the type to checktype
- the class of the type to check.consumer
- the callback to execute if the type matches.