previousOrNull

inline fun <E : Enum<E>> E.previousOrNull(stepSize: Int = 1): E?

Returns the enum entry stepSize before this enum entry, in declaration order. Returns null if the beginning is reached.