gov.sandia.cognition.data.convert
Class AbstractReverseCachedDataConverter<InputType,OutputType,ReverseConverterType extends DataConverter<? super OutputType,? extends InputType>>
java.lang.Object
gov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.data.convert.AbstractDataConverter<InputType,OutputType>
gov.sandia.cognition.data.convert.AbstractReversibleDataConverter<InputType,OutputType>
gov.sandia.cognition.data.convert.AbstractReverseCachedDataConverter<InputType,OutputType,ReverseConverterType>
- Type Parameters:
InputType - The input type to convert from.OutputType - The output type to convert to.ReverseConverterType - The type of the reverse converter.
- All Implemented Interfaces:
- DataConverter<InputType,OutputType>, ReversibleDataConverter<InputType,OutputType>, Evaluator<InputType,OutputType>, ReversibleEvaluator<InputType,OutputType,DataConverter<? super OutputType,? extends InputType>>, CloneableSerializable, Serializable, Cloneable
- Direct Known Subclasses:
- DefaultBooleanToNumberConverter, StringToDoubleConverter, StringToIntegerConverter
public abstract class AbstractReverseCachedDataConverter<InputType,OutputType,ReverseConverterType extends DataConverter<? super OutputType,? extends InputType>>
- extends AbstractReversibleDataConverter<InputType,OutputType>
Abstract implementation of ReversibleDataConverter that caches the
reverse converter.
- Since:
- 3.0
- Author:
- Justin Basilico
- See Also:
- Serialized Form
reverse
protected transient ReverseConverterType extends DataConverter<? super OutputType,? extends InputType> reverse
- A cached value of the reverse converter.
AbstractReverseCachedDataConverter
public AbstractReverseCachedDataConverter()
- Creates a new
AbstractReverseCachedDataConverter.
reverse
public ReverseConverterType reverse()
- Gets the data converter that performs the reverse conversion.
- Returns:
- The reverse converter.
createReverse
protected abstract ReverseConverterType createReverse()
- Creates a new reverse converter. Should only be called when there is a
cache miss for this converter.
- Returns:
- The reverse converter.
Copyright © 2006-2013 Sandia National Laboratories. All Rights Reserved.