Replaced Switch Case with If-Else If-Else

Since Java 1.6 doesn’t allow Switch Case for strings, replaced it with
If- Else If- Else.