It might be a good idea to use "default:" to throw an exception here, rather than relying on 0L to represent such error.