getStateAs

inline fun <T, R : T> StateContainer<T>.getStateAs(): R?

Returns the current state cast to the specified type, or null if not of that type.