org.specrunner.formatters.core
Class AbstractFormatterTime<T>
java.lang.Object
org.specrunner.formatters.core.AbstractFormatterTime<T>
- Type Parameters:
T - Any object.
- All Implemented Interfaces:
- Serializable, IFormatter, IResetable
- Direct Known Subclasses:
- FormatterDate, FormatterJodatime
public abstract class AbstractFormatterTime<T>
- extends Object
- implements IFormatter
Create time pattern formatter.
- 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 |
cache
protected ICache<String,T> cache
- Cache of formatters.
AbstractFormatterTime
public AbstractFormatterTime()
initialize
public void initialize()
- Description copied from interface:
IResetable
- Initialize something.
- Specified by:
initialize in interface IResetable
format
public String format(Object value,
Object[] args)
throws FormatterException
- Description copied from interface:
IFormatter
- Format a given object to another using some arguments as auxiliary.
- Specified by:
format in interface IFormatter
- Parameters:
value - The value to be formatted.args - The arguments.
- Returns:
- The formatted object.
- Throws:
FormatterException - On format errors.
testType
protected abstract boolean testType(Object value)
newInstance
protected abstract T newInstance(String str)
format
protected abstract String format(T pattern,
Object value,
Object[] args)
Copyright © 2015. All rights reserved.