コード例 #1
0
 private void initJob() {
   final String jobStr = properties.getProperty(PROPERTY_JOB);
   GameJob job = JOB_DEFAULT;
   if (jobStr != null) {
     try {
       job = GameJob.valueOf(jobStr);
     } catch (IllegalArgumentException e) {
       logger.warn(WARN_MSG_INVALID_VALUE, jobStr, PROPERTY_JOB);
     }
   }
   properties.setProperty(PROPERTY_JOB, job.name());
 }
コード例 #2
0
 @Override
 public synchronized GameJob getJob() {
   return GameJob.valueOf(properties.getProperty(PROPERTY_JOB));
 }