gov.sandia.cognition.data.convert
Class IdentityDataConverter<DataType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.data.convert.AbstractDataConverter<InputType,OutputType>
          extended by gov.sandia.cognition.data.convert.AbstractReversibleDataConverter<DataType,DataType>
              extended by gov.sandia.cognition.data.convert.IdentityDataConverter<DataType>
Type Parameters:
DataType - The data type that is allowed.
All Implemented Interfaces:
DataConverter<DataType,DataType>, ReversibleDataConverter<DataType,DataType>, Evaluator<DataType,DataType>, CloneableSerializable, Serializable, Cloneable

public class IdentityDataConverter<DataType>
extends AbstractReversibleDataConverter<DataType,DataType>

A pass-through converter that just returns the given value.

Since:
3.0
Author:
Justin Basilico
See Also:
Serialized Form

Constructor Summary
IdentityDataConverter()
          Creates a new IdentityDataConverter.
 
Method Summary
 DataType evaluate(DataType input)
          Returns the given input.
 IdentityDataConverter<DataType> reverse()
          The reverse converter is this converter, since it is an identity converter.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityDataConverter

public IdentityDataConverter()
Creates a new IdentityDataConverter.

Method Detail

evaluate

public DataType evaluate(DataType input)
Returns the given input.

Parameters:
input - The input value.
Returns:
The input value.

reverse

public IdentityDataConverter<DataType> reverse()
The reverse converter is this converter, since it is an identity converter.

Returns:
The reverse converter is this converter.


Copyright © 2006-2011 Sandia National Laboratories. All Rights Reserved.