package jcircus.util; /** * ChanUse.java * * @author Angela */ public enum ChanUse { Undefined, Input, Output, AltInput, Mixed ; public String toJava() { String r; if (this.equals(Undefined)) { r = "GeneralChannel"; } else if (this.equals(Input)) { r = "GeneralChannel"; } else if (this.equals(Output)) { r = "GeneralChannel"; } else if (this.equals(AltInput)) { r = "GeneralChannel"; } else if (this.equals(Mixed)) { r = "GeneralChannel"; } else { throw new RuntimeException("Undefined enum element in class " + this.getClass()); } return r; } public String toStringGUI() { String r; if (this.equals(Undefined)) { r = ""; } else if (this.equals(Input)) { r = "Input"; } else if (this.equals(Output)) { r = "Output"; } else if (this.equals(AltInput)) { r = "Input"; } else { r = ""; } return r; } }