olg.csv.bean.formatter
Class ArrayFormatter<T>

Package class diagram package ArrayFormatter
java.lang.Object
  extended by olg.csv.bean.formatter.Formatter<T[]>
      extended by olg.csv.bean.formatter.ArrayFormatter<T>
Type Parameters:
T - The formatter deals array of T class.

public final class ArrayFormatter<T>
extends Formatter<T[]>

Converts array of T into String.


Field Summary
private  Formatter<T> formatter
          Formatter responsible of formatting T object.
 
Constructor Summary
private ArrayFormatter()
          Constructs an instance with default formatter.
private ArrayFormatter(Formatter<T> formatter)
          Constructs an instance with a formatter.
 
Method Summary
 String toString(T[] array)
          Default implementation based on toString Method of the given t.
 
Methods inherited from class olg.csv.bean.formatter.Formatter
getDateFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formatter

private final Formatter<T> formatter
Formatter responsible of formatting T object.

Constructor Detail

ArrayFormatter

private ArrayFormatter(Formatter<T> formatter)
Constructs an instance with a formatter.

Parameters:
formatter - formatter responsible of T converting

ArrayFormatter

private ArrayFormatter()
Constructs an instance with default formatter.

Method Detail

toString

public String toString(T[] array)
Description copied from class: Formatter
Default implementation based on toString Method of the given t.

Overrides:
toString in class Formatter<T[]>
Parameters:
array - the value to format.
Returns:
the formatted value.


Copyright © 2014. All Rights Reserved.