/** * Sets the context and the properties. * * @param context * an {@link Class} that is used as the context. * * @param parentProperties * the {@link Properties} that are returned. */ public DateContextProperties(Class<?> context, Properties parentProperties) { super(context, parentProperties); this.dateProperties = new DateProperties(this); }
/** * Returns a time duration property using the format defined in * {@link ISOPeriodFormat#standard()}. * * @param key * the property key. * * @return the {@link Duration}. */ public Duration getDurationProperty(String key) { return dateProperties.getDurationProperty(key); }
/** * Returns a time period property using the format defined in * {@link ISOPeriodFormat#standard()}. * * @param key * the property key. * * @return the {@link Period}. */ public Period getPeriodProperty(String key) { return dateProperties.getPeriodProperty(key); }
/** * Returns a time period property using the format defined in * {@link ISOPeriodFormat#standard()}. * * @param key * the property key. * * @return the {@link Period}. */ public Period getPeriodProperty(String key) { String property = getProperty(key); if (property == null) { return null; } else { return new Period(property); } }
/** * Returns a time duration property using the format defined in * {@link ISOPeriodFormat#standard()}. * * @param key * the property key. * * @return the {@link Duration}. */ public Duration getDurationProperty(String key) { String property = getProperty(key); if (property == null) { return null; } else { return new Period(property).toStandardDuration(); } }
/** * Sets the context and the properties. * * @param context * the context. * * @param parentProperties * the {@link Properties} that are returned. */ public DateContextProperties(String context, Properties parentProperties) { super(context, parentProperties); this.dateProperties = new DateProperties(this); }
public Period getPeriodProperty(String key, PeriodFormatter formatter) { return dateProperties.getPeriodProperty(key, formatter); }
public Duration getDurationProperty(String key, PeriodFormatter formatter) { return dateProperties.getDurationProperty(key, formatter); }
/** * Returns a time period property using the format defined in * {@link ISOPeriodFormat#standard()}. * * @param key * the property key. * * @param formatter * the {@link PeriodFormatter} that parses the period property. * * @return the {@link Period}. */ public Period getPeriodProperty(String key, PeriodFormatter formatter) { String property = getProperty(key); if (property == null) { return null; } else { return formatter.parsePeriod(property); } }
public DateProperties create(Map<String, Object> properties, String listSepChars) { return new DateProperties(properties, listSepChars); }
public Period getPeriodProperty(String key) { return dateProperties.getPeriodProperty(key); }
public Duration getDurationProperty(String key) { return dateProperties.getDurationProperty(key); }
/** * Returns a time duration property using the format defined in * {@link ISODurationFormat#standard()}. * * @param key * the property key. * * @param formatter * the {@link PeriodFormatter} that parses the duration property. * * @return the {@link Duration}. */ public Duration getDurationProperty(String key, PeriodFormatter formatter) { String property = getProperty(key); if (property == null) { return null; } else { return formatter.parsePeriod(property).toStandardDuration(); } }
public DateProperties create(Properties properties) { return new DateProperties(properties); } }
/** * Returns a time period property using the format defined in * {@link ISOPeriodFormat#standard()}. * * @param key * the property key. * * @param formatter * the {@link PeriodFormatter} that parses the period property. * * @return the {@link Period}. */ public Period getPeriodProperty(String key, PeriodFormatter formatter) { return dateProperties.getPeriodProperty(key, formatter); }
/** * Returns a time duration property using the format defined in * {@link ISODurationFormat#standard()}. * * @param key * the property key. * * @param formatter * the {@link PeriodFormatter} that parses the duration property. * * @return the {@link Duration}. */ public Duration getDurationProperty(String key, PeriodFormatter formatter) { return dateProperties.getDurationProperty(key, formatter); }
/** * Sets the context and the properties. * * @param context * an {@link Object} that is used as the context. * * @param parentProperties * the {@link Properties} that are returned. */ public DateContextProperties(Object context, Properties parentProperties) { super(context, parentProperties); this.dateProperties = new DateProperties(this); }
public DateProperties create(Properties properties, String listSepChars) { return new DateProperties(properties, listSepChars); }
public DateProperties create(Map<String, Object> properties) { return new DateProperties(properties); }
@AssistedInject TypedAllProperties(@Assisted Map<String, Object> properties) { super(properties); this.dateProperties = new DateProperties(properties); }