getBehaviorOrNull

inline fun <T : Any> getBehaviorOrNull(): T?

Gets the first ItemBehavior that is an instance of T, or null if there is none.


fun <T : Any> getBehaviorOrNull(type: KClass<T>): T?

Gets the first ItemBehavior that is an instance of type or a subclass, or null if there is none.