next

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

Returns the enum entry stepSize after this enum entry, in declaration order. Cycles back to the first entry if the end is reached.