com.taco.text
Class IntArrayToStringConverter

java.lang.Object
  extended by com.taco.text.AbstractObjectToStringConverter
      extended by com.taco.text.IntArrayToStringConverter
All Implemented Interfaces:
IObjectToStringConverter, IObjectMapper

public final class IntArrayToStringConverter
extends AbstractObjectToStringConverter

A converter from int arrays to comma-separated strings.


Field Summary
static IntArrayToStringConverter instance
          The singleton instance of this class.
 
Method Summary
 java.lang.String toString(java.lang.Object obj)
          Cast obj to int[], and return the result of ArrayUtilities.toString() on the array.
 
Methods inherited from class com.taco.text.AbstractObjectToStringConverter
map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final IntArrayToStringConverter instance
The singleton instance of this class.

Method Detail

toString

public final java.lang.String toString(java.lang.Object obj)
Cast obj to int[], and return the result of ArrayUtilities.toString() on the array.

Specified by:
toString in interface IObjectToStringConverter
Specified by:
toString in class AbstractObjectToStringConverter
Parameters:
obj - The array to convert; must be a non-null instance of int[].
Returns:
The string representation of the array.
Throws:
java.lang.IllegalArgumentException - if obj is null or not an instance of int[].