getBehavior

inline fun <T : Any> getBehavior(): T

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


fun <T : Any> getBehavior(behavior: KClass<T>): T

Gets the first ItemBehavior that is an instance of behavior, or throws an IllegalStateException if there is none.