org.specrunner.converters.core
Class ConverterLocalDateCurrentTemplate
java.lang.Object
org.specrunner.converters.core.ConverterDefault
org.specrunner.converters.core.ConverterNotNullNotEmpty
org.specrunner.converters.core.AbstractConverterTimezone<T>
org.specrunner.converters.core.AbstractConverterTimeTemplate<org.joda.time.LocalDate>
org.specrunner.converters.core.ConverterLocalDateCurrentTemplate
- All Implemented Interfaces:
- Serializable, IConverter, IResetable
- Direct Known Subclasses:
- ConverterLocalDateCurrent
public class ConverterLocalDateCurrentTemplate
- extends AbstractConverterTimeTemplate<org.joda.time.LocalDate>
Create current date.
- Author:
- Thiago Santos
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
aliasToField
protected Map<String,String> aliasToField
fieldToMethod
protected Map<String,String> fieldToMethod
pattern
protected Pattern pattern
ConverterLocalDateCurrentTemplate
public ConverterLocalDateCurrentTemplate(List<String> values)
- See superclass.
- Parameters:
values - Value.
bindAliases
protected Map<String,String> bindAliases(Map<String,String> map)
bindPatterns
protected Map<String,String> bindPatterns(Map<String,String> map)
extractPattern
protected Pattern extractPattern(Set<String> set)
testValue
protected boolean testValue(String str,
String value)
- Description copied from class:
AbstractConverterTimeTemplate
- Test the string against a value.
- Overrides:
testValue in class AbstractConverterTimeTemplate<org.joda.time.LocalDate>
- Parameters:
str - String.value - A value.
- Returns:
- true, if valid, false, otherwise.
instance
protected org.joda.time.LocalDate instance()
- Description copied from class:
AbstractConverterTimeTemplate
- Creates an instance of date.
- Specified by:
instance in class AbstractConverterTimeTemplate<org.joda.time.LocalDate>
- Returns:
- Something aka 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 AbstractConverterTimeTemplate<org.joda.time.LocalDate>
- Parameters:
value - The value to be converted.args - The arguments.
- Returns:
- The converted object.
- Throws:
ConverterException - On conversion errors.
postProcess
protected org.joda.time.LocalDate postProcess(Object value,
Object[] args,
org.joda.time.LocalDate result)
- Description copied from class:
AbstractConverterTimeTemplate
- Post process a instance of data.
- Overrides:
postProcess in class AbstractConverterTimeTemplate<org.joda.time.LocalDate>
- Parameters:
value - The original value.args - The arguments.result - The result.
- Returns:
- A time processed. i.e. plusDays, if specified.
Copyright © 2015. All rights reserved.