org.springframework.batch.classify
Class ClassifierSupport<C,T>

java.lang.Object
  extended by org.springframework.batch.classify.ClassifierSupport<C,T>
All Implemented Interfaces:
Classifier<C,T>

public class ClassifierSupport<C,T>
extends Object
implements Classifier<C,T>

Base class for Classifier implementations. Provides default behaviour and some convenience members, like constants.

Author:
Dave Syer

Constructor Summary
ClassifierSupport(T defaultValue)
           
 
Method Summary
 T classify(C throwable)
          Always returns the default value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassifierSupport

public ClassifierSupport(T defaultValue)
Parameters:
defaultValue -
Method Detail

classify

public T classify(C throwable)
Always returns the default value. This is the main extension point for subclasses, so it must be able to classify null.

Specified by:
classify in interface Classifier<C,T>
Parameters:
throwable - the input object. Can be null.
Returns:
an object. Can be null, but implementations should declare if this is the case.
See Also:
Classifier.classify(Object)


Copyright © 2013 SpringSource. All Rights Reserved.