isDerivedFrom

open fun isDerivedFrom(@NotNull elementClass: @NotNull Class<out BlueprintElement>): Boolean

Tests whether the parent element is derived from (an instance of) the specified class type.


// Instead of:
boolean isDerived = getGroup().getParent() instanceof BlueprintElement.class;

// You can write:
boolean isDerived = isDerivedFrom(BlueprintElement.class);

Return

true if the parent is an instance of elementClass; false otherwise

Since

3.6.0

Parameters

elementClass

the expected class type