⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view.java

📁 《Java案例开发》源代码252KB大小
💻 JAVA
字号:
/* * View.java * * Created on 2003年11月6日, 上午9:38 */package romulus;/** * * @author  Romulus * @version 1.0 */public class View {        /** The String ident of the views.*/    private static String Str_View[] = {"Unknown", "Teacher", "Master", "Student"};        /** Get the string ident use int.*/    public static String getView(int ident){        //1 is Teacher        //2 is Master        //3 is Student        //0 and others are Unknown        if(ident < 0 || ident >3){            return Str_View[0];        }        else{            return Str_View[ident];        }    }        /** Get the int ident use string.*/    public static int getView(String ident){        if(ident.equals(Str_View[1])){            return 1;        }        else if(ident.equals(Str_View[2])){            return 2;        }        else if(ident.equals(Str_View[3])){            return 3;        }        else{            return 0;        }    }    /** Creates new View */    private View() {    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -