@Test public void testObjectConversionHappy() { Date date = new Date(); JobParameter dateParam = JobParamUtil.createJobParameter(date); Assertions.assertEquals(dateParam.getValue(), date); Long longVar = new Long(1234); JobParameter longParam = JobParamUtil.createJobParameter(longVar); Assertions.assertEquals(longParam.getValue(), longVar); Double doubleVar = new Double(123.123); JobParameter doubleParam = JobParamUtil.createJobParameter(doubleVar); Assertions.assertEquals(doubleParam.getValue(), doubleVar); }
public static JobParameter createJobParameter(Object value) { if (value instanceof Date) return new JobParameter((Date) value); else if (value instanceof Long) return new JobParameter((Long) value); else if (value instanceof Double) return new JobParameter((Double) value); else return new JobParameter("" + value); }
JobParamUtil { public static JobParameter createJobParameter(Object value) { if (value instanceof Date) return new JobParameter((Date) value); else if (value instanceof Long) return new JobParameter((Long) value); else if (value instanceof Double) return new JobParameter((Double) value); else return new JobParameter("" + value); } }
JobParamUtil { public static JobParameter createJobParameter(Object value) { if (value instanceof Date) return new JobParameter((Date) value); else if (value instanceof Long) return new JobParameter((Long) value); else if (value instanceof Double) return new JobParameter((Double) value); else return new JobParameter("" + value); }  }
JobParamUtil { public static JobParameter createJobParameter(Object value) { if (value instanceof Date) return new JobParameter((Date) value); else if (value instanceof Long) return new JobParameter((Long) value); else if (value instanceof Double) return new JobParameter((Double) value); else return new JobParameter("" + value); }  static JobParameters convertRawToJobParams(Map<String, Object> properties); static Map<String, JobParameter> convertRawToParamMap(Map<String, Object> properties); static JobParameter createJobParameter(Object value); }
JobParamUtil { public static JobParameter createJobParameter(Object value) { if (value instanceof Date) return new JobParameter((Date) value); else if (value instanceof Long) return new JobParameter((Long) value); else if (value instanceof Double) return new JobParameter((Double) value); else return new JobParameter("" + value); }  static JobParameters convertRawToJobParams(Map<String, Object> properties); static Map<String, JobParameter> convertRawToParamMap(Map<String, Object> properties); static JobParameter createJobParameter(Object value);  }