org.databene.commons.converter
Class ArrayElementExtractor<E>

java.lang.Object
  extended by org.databene.commons.converter.AbstractConverter<S,T>
      extended by org.databene.commons.converter.ThreadSafeConverter<E[],E>
          extended by org.databene.commons.converter.ArrayElementExtractor<E>
All Implemented Interfaces:
java.lang.Cloneable, Converter<E[],E>, ThreadAware

public class ArrayElementExtractor<E>
extends ThreadSafeConverter<E[],E>

Retrieves the value at a given array index from an array.

Created at 30.06.2009 18:02:10

Since:
0.5.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.AbstractConverter
sourceType, targetType
 
Constructor Summary
ArrayElementExtractor(java.lang.Class<E> componentType, int index)
           
 
Method Summary
 E convert(E[] sourceValue)
          Concerts an object of type S to an object of type T
 
Methods inherited from class org.databene.commons.converter.ThreadSafeConverter
clone, isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.commons.converter.AbstractConverter
getSourceType, getTargetType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayElementExtractor

public ArrayElementExtractor(java.lang.Class<E> componentType,
                             int index)
Method Detail

convert

public E convert(E[] sourceValue)
          throws ConversionException
Description copied from interface: Converter
Concerts an object of type S to an object of type T

Parameters:
sourceValue - the object to convert
Returns:
the converted object
Throws:
ConversionException - if the conversion fails


Copyright © 2010. All Rights Reserved.