org.specrunner.converters.core
Class AbstractConverterTimeTemplate<T>
java.lang.Object
org.specrunner.converters.core.ConverterNotNullNotEmpty
org.specrunner.converters.core.AbstractConverterTimezone<T>
org.specrunner.converters.core.AbstractConverterTimeTemplate<T>
- Type Parameters:
T - Date object.
- All Implemented Interfaces:
- Serializable, IConverter, IResetable
- Direct Known Subclasses:
- ConverterDateCurrentTemplate, ConverterDateTimeCurrentTemplate, ConverterLocalDateCurrentTemplate, ConverterTimestampCurrentTemplate
public abstract class AbstractConverterTimeTemplate<T>
- extends AbstractConverterTimezone<T>
Create time information.
- Author:
- Thiago Santos
- See Also:
- Serialized Form
|
Method Summary |
Object |
convert(Object value,
Object[] args)
Convert a given object to another using some arguments as auxiliary. |
protected abstract T |
instance()
Creates an instance of date. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConverterTimeTemplate
public AbstractConverterTimeTemplate(String[] values)
- Constructor using strings.
- Parameters:
values - The values to be converted to date.
AbstractConverterTimeTemplate
public AbstractConverterTimeTemplate(String regexp)
- Constructor using a regular expression.
- Parameters:
regexp - The regular expression to match date.
convert
public Object convert(Object value,
Object[] args)
throws ConverterException
- Description copied from interface:
IConverter
- Convert a given object to another using some arguments as auxiliary.
- Specified by:
convert in interface IConverter- Overrides:
convert in class ConverterNotNullNotEmpty
- Parameters:
value - The value to be converted.args - The arguments.
- Returns:
- The converted object.
- Throws:
ConverterException - On conversion errors.
instance
protected abstract T instance()
- Creates an instance of date.
- Returns:
- Something aka date.
Copyright © 2014. All rights reserved.