I am trying to compile and I get this error:
enigma/Rotor.java:30: incompatible types found : java.lang.String required: int switch(name){ 1 error
If you are using maven project then simply you can add following piece of code to ypur pom.xml and resolve your problem :
org.apache.maven.plugins maven-compiler-plugin 1.8 1.8