java: Unify constants style
Prefer switch over if/else