org.loom.converter.date
Class MinutesConverter
java.lang.Object
org.loom.converter.AbstractConverter
org.loom.converter.AbstractStringConverter
org.loom.converter.AbstractFormatConverter
org.loom.converter.date.MinutesConverter
- All Implemented Interfaces:
- Converter, FormInputDecorator
public final class MinutesConverter
- extends AbstractFormatConverter
Converts a time string in the form hh:MM to an int with the number of minutes
since the beginning of the day
Method Summary |
protected java.text.Format |
createFormat(MessagesRepository messagesRepository)
Creates a new format instance. |
void |
decorate(FormInputTag t)
Add CSS class extracted from this converter return type (number, string, file) to the tag. |
java.lang.String |
getAsTextImpl(java.lang.Object v,
MessagesRepository repository)
This method is the getAsText implementation, and has the guarantee that the value is not null |
protected java.lang.Object |
parse(java.lang.String text,
java.text.ParsePosition pos,
MessagesRepository repository)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinutesConverter
public MinutesConverter()
parse
protected java.lang.Object parse(java.lang.String text,
java.text.ParsePosition pos,
MessagesRepository repository)
- Overrides:
parse
in class AbstractFormatConverter
getAsTextImpl
public java.lang.String getAsTextImpl(java.lang.Object v,
MessagesRepository repository)
- Description copied from class:
AbstractStringConverter
- This method is the getAsText implementation, and has the guarantee that the value is not null
- Overrides:
getAsTextImpl
in class AbstractFormatConverter
createFormat
protected java.text.Format createFormat(MessagesRepository messagesRepository)
- Description copied from class:
AbstractFormatConverter
- Creates a new format instance. Format instances may be different per locale and will be cached in the MessagesRepository
- Specified by:
createFormat
in class AbstractFormatConverter
decorate
public void decorate(FormInputTag t)
- Description copied from class:
AbstractConverter
- Add CSS class extracted from this converter return type (number, string, file) to the tag.
- Specified by:
decorate
in interface FormInputDecorator
- Overrides:
decorate
in class AbstractConverter