gov.sandia.cognition.learning.data
Class AbstractInputOutputPair<InputType,OutputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.data.AbstractInputOutputPair<InputType,OutputType>
Type Parameters:
InputType - The type for the input object in the pair.
OutputType - The type for the output object in the pair.
All Implemented Interfaces:
InputOutputPair<InputType,OutputType>, CloneableSerializable, Pair<InputType,OutputType>, Serializable, Cloneable
Direct Known Subclasses:
DefaultInputOutputPair

public abstract class AbstractInputOutputPair<InputType,OutputType>
extends AbstractCloneableSerializable
implements InputOutputPair<InputType,OutputType>

An abstract implementation of the InputOutputPair interface. It implements the toString, getFirst, and getSecond methods.

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

Constructor Summary
AbstractInputOutputPair()
          Creates a new AbstractInputOutputPair.
 
Method Summary
 InputType getFirst()
          Gets the input, which is the first element in the pair.
 OutputType getSecond()
          Gets the output, which is the second element in the pair.
 String toString()
           
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.data.InputOutputPair
getInput, getOutput
 

Constructor Detail

AbstractInputOutputPair

public AbstractInputOutputPair()
Creates a new AbstractInputOutputPair.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

getFirst

public InputType getFirst()
Gets the input, which is the first element in the pair.

Specified by:
getFirst in interface Pair<InputType,OutputType>
Returns:
The input.

getSecond

public OutputType getSecond()
Gets the output, which is the second element in the pair.

Specified by:
getSecond in interface Pair<InputType,OutputType>
Returns:
The output.