Moved from Scala enum to Java enum.