18 package org.turro.polls;
20 import java.util.Date;
21 import org.turro.string.ObjectString;
48 return (Date) ObjectString.parseString((String) value, POLL_DATETIME_PATTERN, Date.class,
false);
50 return (Date) ObjectString.parseString((String) value, POLL_DATE_PATTERN, Date.class,
false);
52 return (Date) ObjectString.parseString((String) value, POLL_TIME_PATTERN, Date.class,
false);
54 return (Long) ObjectString.parseString((String) value, Long.class,
true);
63 return ObjectString.formatObject(value, POLL_DATETIME_PATTERN,
false);
65 return ObjectString.formatObject(value, POLL_DATE_PATTERN,
false);
67 return ObjectString.formatObject(value, POLL_TIME_PATTERN,
false);
69 return ObjectString.formatObject(value,
false);
71 return (String) value;
75 public static final String
76 POLL_DATETIME_PATTERN =
"yyyy-MM-dd HH:mm",
77 POLL_DATE_PATTERN =
"yyyy-MM-dd",
78 POLL_TIME_PATTERN =
"HH:mm";
82 if(odt.getType().equals(value)) {
String getString(Object value)
Object getValue(String value)
static OptionDataType getOptionType(String value)