nextOrNull

Returns the next value of this enum (ordered the same way as declared in code, i.e. by ordinal).

If the current value is the last, returns null.

See also