cdx.scorebot.util.translator
Class SelfTranslator<TYPE>

java.lang.Object
  extended by cdx.scorebot.util.translator.TypeTranslator<TYPE,TYPE>
      extended by cdx.scorebot.util.translator.SelfTranslator<TYPE>
All Implemented Interfaces:
java.io.Serializable

public class SelfTranslator<TYPE>
extends TypeTranslator<TYPE,TYPE>

This translator does not do any translation; it just passes values through. It is intended for use where a translator must be specified but isn't needed to convert between types.

Author:
David Underhill
See Also:
Serialized Form

Constructor Summary
SelfTranslator()
          Instantiates a translator
 
Method Summary
 TYPE translate1(TYPE valueToTranslate)
          gets the TYPE representation of the specified TYPE
 TYPE translate2(TYPE valueToTranslate)
          gets the TYPE representation of the specified TYPE
 
Methods inherited from class cdx.scorebot.util.translator.TypeTranslator
canTranslate1, canTranslate2, getLastException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelfTranslator

public SelfTranslator()
Instantiates a translator

Method Detail

translate1

public TYPE translate1(TYPE valueToTranslate)
gets the TYPE representation of the specified TYPE

Specified by:
translate1 in class TypeTranslator<TYPE,TYPE>
Parameters:
valueToTranslate - some TYPE
Returns:
the TYPE passed in as valueToTranslate

translate2

public TYPE translate2(TYPE valueToTranslate)
gets the TYPE representation of the specified TYPE

Specified by:
translate2 in class TypeTranslator<TYPE,TYPE>
Parameters:
valueToTranslate - some TYPE
Returns:
the TYPE passed in as valueToTranslate