枚举的赋值:

Scanner sc = new Scanner(System.in);
System.out.println("输入图的类型:");
GraphKind kind = GraphKind.valueOf(sc.next());