Пример #1
0
 public static List<String> getNameList() {
   List<String> nameList = new ArrayList<String>();
   for (StudentFamilyStatus status : StudentFamilyStatus.values()) {
     nameList.add(status.toString());
   }
   return nameList;
 }
Пример #2
0
 public static StudentFamilyStatus fromString(String familyStatus) {
   for (StudentFamilyStatus status : StudentFamilyStatus.values()) {
     if (status.toString().equals(familyStatus)) {
       return status;
     }
   }
   return null;
 }